@@ -997,17 +997,17 @@ registerHeader (ident,classes,kvs) header' = do
997997failUnlessSmart :: HasReaderOptions st => Parser s st ()
998998failUnlessSmart = getOption readerSmart >>= guard
999999
1000−smartPunctuation :: Parser [Char] ParserState Inline
1001− -> Parser [Char] ParserState Inline
1000+smartPunctuation :: Parser [Char] ParserState Inlines
1001+ -> Parser [Char] ParserState Inlines
10021002smartPunctuation inlineParser = do
10031003 failUnlessSmart
10041004 choice [ quoted inlineParser, apostrophe, dash, ellipses ]
10051005
1006−apostrophe :: Parser [Char] ParserState Inline
1007−apostrophe = (char '\'' <|> char '\8217') >> return (Str "\x2019")
1006+apostrophe :: Parser [Char] ParserState Inlines
1007+apostrophe = (char '\'' <|> char '\8217') >> return (B.str "\x2019")
10081008
1009−quoted :: Parser [Char] ParserState Inline
1010− -> Parser [Char] ParserState Inline
1009+quoted :: Parser [Char] ParserState Inlines
1010+ -> Parser [Char] ParserState Inlines
10111011quoted inlineParser = doubleQuoted inlineParser <|> singleQuoted inlineParser
10121012
10131013withQuoteContext :: QuoteContext
@@ -1022,20 +1022,19 @@ withQuoteContext context parser = do
10221022 setState newState { stateQuoteContext = oldQuoteContext }
10231023 return result
10241024
1025−singleQuoted :: Parser [Char] ParserState Inline
1026− -> Parser [Char] ParserState Inline
1025+singleQuoted :: Parser [Char] ParserState Inlines
1026+ -> Parser [Char] ParserState Inlines
10271027singleQuoted inlineParser = try $ do
10281028 singleQuoteStart
10291029 withQuoteContext InSingleQuote $ many1Till inlineParser singleQuoteEnd >>=
1030− return . Quoted SingleQuote . normalizeSpaces
1030+ return . B.singleQuoted . mconcat
10311031
1032−doubleQuoted :: Parser [Char] ParserState Inline
1033− -> Parser [Char] ParserState Inline
1032+doubleQuoted :: Parser [Char] ParserState Inlines
1033+ -> Parser [Char] ParserState Inlines
10341034doubleQuoted inlineParser = try $ do
10351035 doubleQuoteStart
1036− withQuoteContext InDoubleQuote $ do
1037− contents <- manyTill inlineParser doubleQuoteEnd
1038− return . Quoted DoubleQuote . normalizeSpaces $ contents
1036+ withQuoteContext InDoubleQuote $ manyTill inlineParser doubleQuoteEnd >>=
1037+ return . B.doubleQuoted . mconcat
10391038
10401039failIfInQuoteContext :: QuoteContext -> Parser [tok] ParserState ()
10411040failIfInQuoteContext context = do
@@ -1079,17 +1078,17 @@ doubleQuoteEnd = do
10791078 charOrRef "\"\8221\148"
10801079 return ()
10811080
1082−ellipses :: Parser [Char] st Inline
1081+ellipses :: Parser [Char] st Inlines
10831082ellipses = do
10841083 try (charOrRef "\8230\133") <|> try (string "..." >> return '…')
1085− return (Str "\8230")
1084+ return (B.str "\8230")
10861085
1087−dash :: Parser [Char] ParserState Inline
1086+dash :: Parser [Char] ParserState Inlines
10881087dash = do
10891088 oldDashes <- getOption readerOldDashes
10901089 if oldDashes
10911090 then emDashOld <|> enDashOld
1092− else Str `fmap` (hyphenDash <|> emDash <|> enDash)
1091+ else B.str `fmap` (hyphenDash <|> emDash <|> enDash)
10931092
10941093-- Two hyphens = en-dash, three = em-dash
10951094hyphenDash :: Parser [Char] st String
@@ -1107,16 +1106,16 @@ enDash = do
11071106 try (charOrRef "\8212\151")
11081107 return "\8211"
11091108
1110−enDashOld :: Parser [Char] st Inline
1109+enDashOld :: Parser [Char] st Inlines
11111110enDashOld = do
11121111 try (charOrRef "\8211\150") <|>
11131112 try (char '-' >> lookAhead (satisfy isDigit) >> return '–')
1114− return (Str "\8211")
1113+ return (B.str "\8211")
11151114
1116−emDashOld :: Parser [Char] st Inline
1115+emDashOld :: Parser [Char] st Inlines
11171116emDashOld = do
11181117 try (charOrRef "\8212\151") <|> (try $ string "--" >> optional (char '-') >> return '-')
1119− return (Str "\8212")
1118+ return (B.str "\8212")
11201119
11211120-- This is used to prevent exponential blowups for things like:
11221121-- a**a*a**a*a**a*a**a*a**a*a**a*a**