From 0d3c7b5204232ca412c11b28c18d86e20f689e21 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 12 May 2012 12:33:51 -0700 Subject: Don't include non-language classes for code blocks. --- src/Text/Pandoc/Readers/DocBook.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') 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 -- cgit v1.2.3