Fix #2 and update .lessfilter to Pygments v2.14.0

This commit is contained in:
CoeJoder
2023-01-01 21:44:53 -08:00
parent 5fc71d9e20
commit e5d89d3d2b
4 changed files with 51 additions and 51 deletions

View File

@@ -22,8 +22,8 @@ for path in "$@"; do
*)
# unrecognized filename/extension
# attempt to parse the lexer from the shebang if it exists
lexer=$(head -n 1 "$path" |grep "^#\!" |awk -F" " \
'match($1, /\/(\w*)$/, a) {if (a[1]!="env") {print a[1]} else {print $2}}')
lexer=$(head -n 1 "$path" | grep '^#\!' | awk -F" " \
'{ if (/env/) { print $2 } else { sub( /.*\//, ""); print $1;} }')
case "$lexer" in
node|nodejs)
# workaround for lack of Node.js lexer alias