@@ -353,7 +353,7 @@ extractSpaces f is =
353353
354354-- | Extract inlines, removing formatting.
355355removeFormatting :: Walkable Inline a => a -> [Inline]
356−removeFormatting = query go . walk deNote
356+removeFormatting = query go . walk (deNote . deQuote)
357357 where go :: Inline -> [Inline]
358358 go (Str xs) = [Str xs]
359359 go Space = [Space]
@@ -367,11 +367,18 @@ deNote :: Inline -> Inline
367367deNote (Note _) = Str ""
368368deNote x = x
369369
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"])
375+deQuote x = x
376+
370377-- | Convert pandoc structure to a string with formatting removed.
371378-- Footnotes are skipped (since we don't want their contents in link
372379-- labels).
373380stringify :: Walkable Inline a => a -> String
374−stringify = query go . walk deNote
381+stringify = query go . walk (deNote . deQuote)
375382 where go :: Inline -> [Char]
376383 go Space = " "
377384 go SoftBreak = " "