diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2006-12-31 17:34:06 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2006-12-31 17:34:06 +0000 |
commit | 0b6dc98a0aba0e76567744c00ed6840215ca5d9d (patch) | |
tree | 1bda74f4387401311e0382eff48955b33c7ec424 /src/Text/ParserCombinators/Pandoc.hs | |
parent | 83cddbc68233ea0efe71a036c88bfb2b4a3cfe6b (diff) | |
download | pandoc-0b6dc98a0aba0e76567744c00ed6840215ca5d9d.tar.gz |
Changed Markdown reader so that the first pass, in which a list
of reference keys is made, is much faster. This gets us a big
performance boost.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@353 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/ParserCombinators/Pandoc.hs')
-rw-r--r-- | src/Text/ParserCombinators/Pandoc.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Text/ParserCombinators/Pandoc.hs b/src/Text/ParserCombinators/Pandoc.hs index 732d1b06d..55481b8dc 100644 --- a/src/Text/ParserCombinators/Pandoc.hs +++ b/src/Text/ParserCombinators/Pandoc.hs @@ -28,6 +28,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Special parser combinators for Pandoc readers. -} module Text.ParserCombinators.Pandoc ( + anyLine, many1Till, followedBy', notFollowedBy', @@ -47,6 +48,10 @@ import Text.Pandoc.Definition import Text.Pandoc.Shared import Char ( toUpper, toLower ) +--- | Parse any line of text +anyLine :: GenParser Char st [Char] +anyLine = manyTill anyChar (newline <|> (do{eof; return '\n'})) + -- | Parses a character and returns 'Null' (so that the parser can move on -- if it gets stuck). nullBlock :: GenParser Char st Block |