From 6740a9592a4cc20b501ea5c8d35c9fcb27203af0 Mon Sep 17 00:00:00 2001 From: mpickering Date: Thu, 25 Sep 2014 19:20:12 +0100 Subject: HTML Reader: Recognise
tags inside
 blocks

Closes #1620
---
 src/Text/Pandoc/Readers/HTML.hs | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'src/Text/Pandoc/Readers')

diff --git a/src/Text/Pandoc/Readers/HTML.hs b/src/Text/Pandoc/Readers/HTML.hs
index 4ea5f41d5..4e0bb375a 100644
--- a/src/Text/Pandoc/Readers/HTML.hs
+++ b/src/Text/Pandoc/Readers/HTML.hs
@@ -440,7 +440,7 @@ pCodeBlock :: TagParser Blocks
 pCodeBlock = try $ do
   TagOpen _ attr <- pSatisfy (~== TagOpen "pre" [])
   contents <- manyTill pAnyTag (pCloses "pre" <|> eof)
-  let rawText = concatMap fromTagText $ filter isTagText contents
+  let rawText = concatMap tagToString contents
   -- drop leading newline if any
   let result' = case rawText of
                      '\n':xs  -> xs
@@ -451,6 +451,11 @@ pCodeBlock = try $ do
                     _        -> result'
   return $ B.codeBlockWith (mkAttr attr) result
 
+tagToString :: Tag String -> String
+tagToString (TagText s) = s
+tagToString (TagOpen "br" _) = "\n"
+tagToString _ = ""
+
 inline :: TagParser Inlines
 inline = choice
            [ eNoteref
-- 
cgit v1.2.3


From 5cb475c37491db4bdffebfd06e55984ff118c10b Mon Sep 17 00:00:00 2001
From: Matthew Pickering 
Date: Sat, 27 Sep 2014 22:37:54 +0100
Subject: Org Reader: Parse multi-inline terms correctly in definition list

Closes #1649
---
 src/Text/Pandoc/Readers/Org.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/Text/Pandoc/Readers')

diff --git a/src/Text/Pandoc/Readers/Org.hs b/src/Text/Pandoc/Readers/Org.hs
index b07f96846..5c00a1b27 100644
--- a/src/Text/Pandoc/Readers/Org.hs
+++ b/src/Text/Pandoc/Readers/Org.hs
@@ -863,7 +863,7 @@ definitionListItem parseMarkerGetLength = try $ do
   line1 <- anyLineNewline
   blank <- option "" ("\n" <$ blankline)
   cont <- concat <$> many (listContinuation markerLength)
-  term' <- parseFromString inline term
+  term' <- parseFromString parseInlines term
   contents' <- parseFromString parseBlocks $ line1 ++ blank ++ cont
   return $ (,) <$> term' <*> fmap (:[]) contents'
 
-- 
cgit v1.2.3