@@ -440,7 +440,7 @@ pCodeBlock :: TagParser Blocks
440pCodeBlock = try $ do
440pCodeBlock = try $ do
441 TagOpen _ attr <- pSatisfy (~== TagOpen "pre" [])
441 TagOpen _ attr <- pSatisfy (~== TagOpen "pre" [])
442 contents <- manyTill pAnyTag (pCloses "pre" <|> eof)
442 contents <- manyTill pAnyTag (pCloses "pre" <|> eof)
443− let rawText = concatMap fromTagText $ filter isTagText contents
443+ let rawText = concatMap tagToString contents
444 -- drop leading newline if any
444 -- drop leading newline if any
445 let result' = case rawText of
445 let result' = case rawText of
446 '\n':xs -> xs
446 '\n':xs -> xs
@@ -451,6 +451,11 @@ pCodeBlock = try $ do
451 _ -> result'
451 _ -> result'
452 return $ B.codeBlockWith (mkAttr attr) result
452 return $ B.codeBlockWith (mkAttr attr) result
454+tagToString :: Tag String -> String
455+tagToString (TagText s) = s
456+tagToString (TagOpen "br" _) = "\n"
454inline :: TagParser Inlines
459inline :: TagParser Inlines
455inline = choice
460inline = choice
456 [ eNoteref
461 [ eNoteref