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:
parent
d0152847d7
commit
11c5831a1f
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue