summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2012-05-12 12:33:51 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2012-05-12 12:33:51 -0700
commit0d3c7b5204232ca412c11b28c18d86e20f689e21 (patch)
tree83cde5c629d52a33805b8cdd38c7fdfdab782a3a /src/Text/Pandoc
parent2c04d0b2bf353f340041c397bc5ebe7662364e68 (diff)
Don't include non-language classes for code blocks.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/DocBook.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Readers/DocBook.hs b/src/Text/Pandoc/Readers/DocBook.hs
index 1f8760b2e..08419430e 100644
--- a/src/Text/Pandoc/Readers/DocBook.hs
+++ b/src/Text/Pandoc/Readers/DocBook.hs
@@ -697,9 +697,9 @@ parseBlock (Elem e) =
"book" -> modify (\st -> st{ dbBook = True }) >> getTitle >> getBlocks e
"table" -> parseTable
"informaltable" -> parseTable
- "literallayout" -> codeBlockWithLang ["literallayout"]
- "screen" -> codeBlockWithLang ["screen"]
- "programlisting" -> codeBlockWithLang []
+ "literallayout" -> codeBlockWithLang
+ "screen" -> codeBlockWithLang
+ "programlisting" -> codeBlockWithLang
"?xml" -> return mempty
_ -> getBlocks e
where getBlocks e' = mconcat <$> (mapM parseBlock $ elContent e')
@@ -713,10 +713,10 @@ parseBlock (Elem e) =
b <- parseBlock r
x <- parseMixed container rs
return $ p <> b <> x
- codeBlockWithLang classes = do
+ codeBlockWithLang = do
let classes' = case attrValue "language" e of
- "" -> classes
- x -> x:classes
+ "" -> []
+ x -> [x]
return $ codeBlockWith (attrValue "id" e, classes', [])
$ trimNl $ strContent e
parseBlockquote = do