mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-26 02:06:32 +00:00
Make language extensions trigger highlighting.
For example, `py` will now work as well as `python`. Closes jgm/highlighting-kate#83.
This commit is contained in:
@@ -70,7 +70,8 @@ highlight formatter (_, classes, keyvals) rawCode =
|
||||
startNumber = firstNum,
|
||||
numberLines = any (`elem`
|
||||
["number","numberLines", "number-lines"]) classes }
|
||||
lcclasses = map (map toLower) classes
|
||||
lcclasses = map (map toLower)
|
||||
(classes ++ concatMap languagesByExtension classes)
|
||||
in case find (`elem` lcLanguages) lcclasses of
|
||||
Nothing
|
||||
| numberLines fmtOpts -> Just
|
||||
|
||||
Reference in New Issue
Block a user