Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.zx2c4.com/cgit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xfilters/syntax-highlighting.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/filters/syntax-highlighting.sh b/filters/syntax-highlighting.sh
index 0639b10..47f6267 100755
--- a/filters/syntax-highlighting.sh
+++ b/filters/syntax-highlighting.sh
@@ -39,8 +39,11 @@
BASENAME="$1"
EXTENSION="${BASENAME##*.}"
+[ "${BASENAME}" = "${EXTENSION}" ] && EXTENSION=txt
+[ -z "${EXTENSION}" ] && EXTENSION=txt
+
# map Makefile and Makefile.* to .mk
-[ "${BASENAME%%.*}" == "Makefile" ] && EXTENSION=mk
+[ "${BASENAME%%.*}" = "Makefile" ] && EXTENSION=mk
# highlight versions 2 and 3 have different commandline options. Specifically,
# the -X option that is used for version 2 is replaced by the -O xhtml option