diff options
author | 2025-01-15 14:13:06 +0100 | |
---|---|---|
committer | 2025-01-15 14:13:06 +0100 | |
commit | 6e14456a23fbfddc371e196a52f5f2cb0533f20d (patch) | |
tree | 8a652d6ad0d754f779f4673c350a264c85004c4e /image | |
parent | 6f080713489cfc11bfc4fc77b57ea9398bef424b (diff) | |
download | cgit-oci-6e14456a23fbfddc371e196a52f5f2cb0533f20d.tar.gz cgit-oci-6e14456a23fbfddc371e196a52f5f2cb0533f20d.tar.bz2 cgit-oci-6e14456a23fbfddc371e196a52f5f2cb0533f20d.tar.lz cgit-oci-6e14456a23fbfddc371e196a52f5f2cb0533f20d.zip |
feat: for .md, run markdown-tool
Diffstat (limited to 'image')
-rwxr-xr-x | image/filters/syntax-highlighting.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/image/filters/syntax-highlighting.sh b/image/filters/syntax-highlighting.sh index 46ad2bb..1bd02b1 100755 --- a/image/filters/syntax-highlighting.sh +++ b/image/filters/syntax-highlighting.sh @@ -1,5 +1,8 @@ #!/bin/sh set -e +if [[ "$1" == *.md ]]; then + exec markdown-tool +fi echo -n "<pre>" bat -pp --color always --file-name "$1" | ansi2html -i echo -n '</pre>' |