DocBook reader: honor linenumbering attribute
The attribute DocBook linenumbering="numbered" attribute on code blocks maps to "numberLines" internally.
This commit is contained in:
parent
ed8877bd68
commit
628cde48cf
3 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -101,6 +101,11 @@
|
|||
sub status {
|
||||
print "working";
|
||||
}
|
||||
</programlisting>
|
||||
<programlisting linenumbering="numbered">
|
||||
sub status {
|
||||
print "working with line numbers";
|
||||
}
|
||||
</programlisting>
|
||||
<screen>
|
||||
% <command>ls</command>
|
||||
|
|
|
@ -266,6 +266,9 @@ Pandoc
|
|||
]
|
||||
, CodeBlock
|
||||
( "" , [] , [] ) "sub status {\n print \"working\";\n}"
|
||||
, CodeBlock
|
||||
( "" , [ "numberLines" ] , [] )
|
||||
"sub status {\n print \"working with line numbers\";\n}"
|
||||
, CodeBlock ( "" , [] , [] ) "% ls"
|
||||
, Para [ Str "A" , Space , Str "list:" ]
|
||||
, OrderedList
|
||||
|
|
Loading…
Reference in a new issue