@@ -50,7 +50,6 @@ import Data.Char ( isDigit )
5050import Control.Monad ( liftM, guard, when, mzero )
5151import Control.Applicative ( (<$>), (<$), (<*) )
5252import Data.Monoid
53−import Data.Sequence (ViewL(..), ViewR(..), viewr, viewl)
5453
5554isSpace :: Char -> Bool
5655isSpace ' ' = True
@@ -369,9 +368,9 @@ pQ = do
369368 then InSingleQuote
370369 else InDoubleQuote
371370 let constructor = case quoteType of
372− SingleQuote -> B.singleQuoted
371+ SingleQuote -> B.singleQuoted
373372 DoubleQuote -> B.doubleQuoted
374− withQuoteContext innerQuoteContext $
373+ withQuoteContext innerQuoteContext $
375374 pInlinesInTags "q" constructor
376375
377376pEmph :: TagParser Inlines
@@ -406,7 +405,7 @@ pLink = try $ do
406405 let url = fromAttrib "href" tag
407406 let title = fromAttrib "title" tag
408407 lab <- trimInlines . mconcat <$> manyTill inline (pCloses "a")
409− return $ B.link (escapeURI url) title lab
408+ return $ B.link (escapeURI url) title lab
410409
411410pImage :: TagParser Inlines
412411pImage = do
@@ -439,15 +438,7 @@ pRawHtmlInline = do
439438
440439pInlinesInTags :: String -> (Inlines -> Inlines)
441440 -> TagParser Inlines
442−pInlinesInTags tagtype f = do
443− contents <- B.unMany <$> pInTags tagtype inline
444− let left = case viewl contents of
445− (Space :< _) -> B.space
446− _ -> mempty
447− let right = case viewr contents of
448− (_ :> Space) -> B.space
449− _ -> mempty
450− return (left <> f (trimInlines . B.Many $ contents) <> right)
441+pInlinesInTags tagtype f = extractSpaces f <$> pInTags tagtype inline
451442
452443pInTags :: (Monoid a) => String -> TagParser a
453444 -> TagParser a