pages/syntax_wrapper.sh
2025-06-16 22:19:58 -04:00

7 lines
No EOL
188 B
Bash
Executable file

#! /usr/bin/env sh
if [ $# -lt 1 ] || ! pygmentize -L lexers | grep -qw "$1"; then
recode ascii..html
else
pygmentize -l $1 -f html | head -c -13 | awk -F '<pre>' '{print $NF}'
fi