aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2021-10-14 15:15:25 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2021-10-14 09:04:56 -0700
commit628cde48cf54d806508869a9d6f4307efc266ef2 (patch)
tree104496d6b86d36ff437362cb7f6c7e44ad950160 /src/Text
parented8877bd687333657b82864d609f4db69743c165 (diff)
downloadpandoc-628cde48cf54d806508869a9d6f4307efc266ef2.tar.gz
DocBook reader: honor linenumbering attribute
The attribute DocBook linenumbering="numbered" attribute on code blocks maps to "numberLines" internally.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Readers/DocBook.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/DocBook.hs b/src/Text/Pandoc/Readers/DocBook.hs
index c49b82ccf..1c13e597b 100644
--- a/src/Text/Pandoc/Readers/DocBook.hs
+++ b/src/Text/Pandoc/Readers/DocBook.hs
@@ -907,6 +907,7 @@ parseBlock (Elem e) =
let classes' = case attrValue "language" e of
"" -> []
x -> [x]
+ ++ ["numberLines" | attrValue "linenumbering" e == "numbered"]
return $ codeBlockWith (attrValue "id" e, classes', [])
$ trimNl $ strContentRecursive e
parseBlockquote = do