From: Ferry Huberts <[email protected]> Better than setting the extension to the filename, which is what now happens.
Signed-off-by: Ferry Huberts <[email protected]> --- filters/syntax-highlighting.sh | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/filters/syntax-highlighting.sh b/filters/syntax-highlighting.sh index 5fcc9c9..fa597b8 100755 --- a/filters/syntax-highlighting.sh +++ b/filters/syntax-highlighting.sh @@ -39,6 +39,11 @@ BASENAME="$1" EXTENSION="${BASENAME##*.}" +if [ "${BASENAME}" == "${EXTENSION}" ]; then + # the file has no extension, assume text + EXTENSION="txt" +fi + # map Makefile and Makefile.* to .mk [ "${BASENAME%%.*}" == "Makefile" ] && EXTENSION=mk -- 1.7.7.6 _______________________________________________ cgit mailing list [email protected] http://hjemli.net/mailman/listinfo/cgit
