fixed syntax highlighting, finally, I hope

This commit is contained in:
Alexander 2025-06-16 22:19:58 -04:00
parent 808ebfdfa2
commit 594b9ae2d2
4 changed files with 10 additions and 12 deletions

View file

@ -1,9 +1,7 @@
#! /usr/bin/env bash
#! /usr/bin/env sh
if [[ $# -lt 1 ]] || ! pygmentize -L lexers | grep -qw "$1"; then
printf "<code>"
cat
printf "</code>"
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