@@ -353,7 +353,7 @@ extractSpaces f is =
354-- | Extract inlines, removing formatting.
354-- | Extract inlines, removing formatting.
355removeFormatting :: Walkable Inline a => a -> [Inline]
355removeFormatting :: Walkable Inline a => a -> [Inline]
356−removeFormatting = query go . walk deNote
356+removeFormatting = query go . walk (deNote . deQuote)
357 where go :: Inline -> [Inline]
357 where go :: Inline -> [Inline]
358 go (Str xs) = [Str xs]
358 go (Str xs) = [Str xs]
359 go Space = [Space]
359 go Space = [Space]
@@ -367,11 +367,18 @@ deNote :: Inline -> Inline
367deNote (Note _) = Str ""
367deNote (Note _) = Str ""
368deNote x = x
368deNote x = x
370+deQuote :: Inline -> Inline
371+deQuote (Quoted SingleQuote xs) =
372+ Span ("",[],[]) (Str "\8216" : xs ++ [Str "\8217"])
373+deQuote (Quoted DoubleQuote xs) =
374+ Span ("",[],[]) (Str "\8220" : xs ++ [Str "\8221"])
370-- | Convert pandoc structure to a string with formatting removed.
377-- | Convert pandoc structure to a string with formatting removed.
371-- Footnotes are skipped (since we don't want their contents in link
378-- Footnotes are skipped (since we don't want their contents in link
372-- labels).
379-- labels).
373stringify :: Walkable Inline a => a -> String
380stringify :: Walkable Inline a => a -> String
374−stringify = query go . walk deNote
381+stringify = query go . walk (deNote . deQuote)
375 where go :: Inline -> [Char]
382 where go :: Inline -> [Char]
376 go Space = " "
383 go Space = " "
377 go SoftBreak = " "
384 go SoftBreak = " "