From 5dfe131ee07065dc7b68912d9a068508e29e18a4 Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Thu, 2 Nov 2017 16:38:06 -0700
Subject: Support `lineAnchors` (or `line-anchors`) in code blocks, for HTML.

---
 src/Text/Pandoc/Highlighting.hs | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'src')

diff --git a/src/Text/Pandoc/Highlighting.hs b/src/Text/Pandoc/Highlighting.hs
index cd8c5fd4b..9c90b229e 100644
--- a/src/Text/Pandoc/Highlighting.hs
+++ b/src/Text/Pandoc/Highlighting.hs
@@ -85,6 +85,8 @@ highlight syntaxmap formatter (ident, classes, keyvals) rawCode =
   let firstNum = fromMaybe 1 (safeRead (fromMaybe "1" $ lookup "startFrom" keyvals))
       fmtOpts = defaultFormatOpts{
                   startNumber = firstNum,
+                  lineAnchors = any (`elem`
+                        ["line-anchors", "lineAnchors"]) classes,
                   numberLines = any (`elem`
                         ["number","numberLines", "number-lines"]) classes,
                   lineIdPrefix = if null ident
-- 
cgit v1.2.3