diff options
author | Xiao Pan <gky44px1999@gmail.com> | 2024-02-25 12:45:55 +0000 |
---|---|---|
committer | Xiao Pan <gky44px1999@gmail.com> | 2024-02-25 12:51:16 +0000 |
commit | aee52406b4409c1b3cfc717ed777688ab568138f (patch) | |
tree | f764a03dce7fbd1514bef4116901990122d0cf18 /usr/lib | |
parent | 95adecc3706c7e6b1c7871c2c978fb831f5124de (diff) |
cgit syntax highlight using mycgit.css
mycgit.css import cgit.css and highlight.css. Because cgit.css is not a pacman backup file and it will be overwritten once cgit update. I can also update highlight.css automatically via pacman hook or `upd`. Also, I think `highlight` not using `--inline-css` maybe is a better way performance wise and more elegant (less messy generated html source code).
Diffstat (limited to 'usr/lib')
-rwxr-xr-x | usr/lib/cgit/filters/syntax-highlighting-edited.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/lib/cgit/filters/syntax-highlighting-edited.sh b/usr/lib/cgit/filters/syntax-highlighting-edited.sh index f3c8072d..32069e20 100755 --- a/usr/lib/cgit/filters/syntax-highlighting-edited.sh +++ b/usr/lib/cgit/filters/syntax-highlighting-edited.sh @@ -107,7 +107,7 @@ esac # `--force` needed for highlight; one example is `< textfile highlight -O ansi --force`, without `--force` will error 1 and no output if [ "$syntax" ]; then - exec highlight --force --inline-css -f -I -O xhtml -S "$syntax" 2>/dev/null + exec highlight --force -f -I -O xhtml -S "$syntax" 2>/dev/null else - exec highlight --force --inline-css -f -I -O xhtml --syntax-by-name "$1" 2>/dev/null + exec highlight --force -f -I -O xhtml --syntax-by-name "$1" 2>/dev/null fi |