From 11c5831a1ff8f71e2ff850e83f012ea57cc14243 Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Sun, 24 Jan 2016 14:15:06 -0800
Subject: [PATCH] Make language extensions trigger highlighting.

For example, `py` will now work as well as `python`.
Closes jgm/highlighting-kate#83.
---
 src/Text/Pandoc/Highlighting.hs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/Text/Pandoc/Highlighting.hs b/src/Text/Pandoc/Highlighting.hs
index d7a14c129..ecfef1832 100644
--- a/src/Text/Pandoc/Highlighting.hs
+++ b/src/Text/Pandoc/Highlighting.hs
@@ -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