cache supported lexers for pygments
This commit is contained in:
parent
af97adacbe
commit
84699c3143
3 changed files with 8 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
#! /usr/bin/env sh
|
||||
|
||||
if [ $# -lt 1 ] || ! pygmentize -L lexers | grep -qw "$1"; then
|
||||
if [ $# -lt 1 ] || ! grep -qw "$1" lexers.out; then
|
||||
recode utf8..html
|
||||
else
|
||||
pygmentize -l $1 -f html | head -c -13 | awk -F '<pre>' '{print $NF}'
|
||||
pygmentize -l $1 -f html | awk -F '<pre>' '{print substr($NF, 14)}'
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue