git.iko.soy/typeable/pandoc
on master help sign in
Make language extensions trigger highlighting.

For example, `py` will now work as well as `python`. Closes jgm/highlighting-kate#83.

commit11c5831a1ff8f71e2ff850e83f012ea57cc14243 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 24 Jan 2016, 14:15 (11 years ago) parentd015284
1 file changed+2−1
src/Text/Pandoc/Highlighting.hs+2−1
src/Text/Pandoc/Highlighting.hs+2−1
@@ -70,7 +70,8 @@ highlight formatter (_, classes, keyvals) rawCode =
7070 startNumber = firstNum,
7171 numberLines = any (`elem`
7272 ["number","numberLines", "number-lines"]) classes }
73− lcclasses = map (map toLower) classes
73+ lcclasses = map (map toLower)
74+ (classes ++ concatMap languagesByExtension classes)
7475 in case find (`elem` lcLanguages) lcclasses of
7576 Nothing
7677 | numberLines fmtOpts -> Just