@@ -57,6 +57,7 @@ module Text.Pandoc.Shared (
57 -- * Pandoc block and inline list processing
57 -- * Pandoc block and inline list processing
58 orderedListMarkers,
58 orderedListMarkers,
59 normalizeSpaces,
59 normalizeSpaces,
60 compactify,
61 compactify,
61 Element (..),
62 Element (..),
62 hierarchicalize,
63 hierarchicalize,
@@ -340,6 +341,15 @@ normalizeSpaces list =
341 in removeLeading $ removeTrailing $ removeDoubles list
342 in removeLeading $ removeTrailing $ removeDoubles list
344+-- | Convert list of inlines to a string with formatting removed.
345+stringify :: [Inline] -> String
346+stringify = queryWith go
347+ where go :: Inline -> [Char]
343-- | Change final list item from @Para@ to @Plain@ if the list contains
353-- | Change final list item from @Para@ to @Plain@ if the list contains
344-- no other @Para@ blocks.
354-- no other @Para@ blocks.
345compactify :: [[Block]] -- ^ List of list items (each a list of blocks)
355compactify :: [[Block]] -- ^ List of list items (each a list of blocks)