git.iko.soy/typeable/pandoc
on master help sign in
Generalized type of stringify.
commitdd5cb82348dfb2b8febb01db8bdc98ddeac394dc authorJohn MacFarlane <fiddlosopher@gmail.com> dateWed 28 Aug 2013, 08:43 (13 years ago) parent8014809
1 file changed+4−3
src/Text/Pandoc/Shared.hs+4−3
src/Text/Pandoc/Shared.hs+4−3
@@ -1,4 +1,5 @@
1−{-# LANGUAGE DeriveDataTypeable, CPP, MultiParamTypeClasses #-}
1+{-# LANGUAGE DeriveDataTypeable, CPP, MultiParamTypeClasses,
2+ FlexibleContexts #-}
23{-
34Copyright (C) 2006-2013 John MacFarlane <jgm@berkeley.edu>
45
@@ -383,10 +384,10 @@ consolidateInlines (Code a1 x : Code a2 y : zs) | a1 == a2 =
383384consolidateInlines (x : xs) = x : consolidateInlines xs
384385consolidateInlines [] = []
385386
386−-- | Convert list of inlines to a string with formatting removed.
387+-- | Convert pandoc structure to a string with formatting removed.
387388-- Footnotes are skipped (since we don't want their contents in link
388389-- labels).
389−stringify :: [Inline] -> String
390+stringify :: Walkable Inline a => a -> String
390391stringify = query go . walk deNote
391392 where go :: Inline -> [Char]
392393 go Space = " "