diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-06-20 21:52:13 +0200 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-06-20 21:52:13 +0200 |
commit | 2363e6a15bdde1c206d65461bd2e21f773dbc808 (patch) | |
tree | c4e1879cd8d4cfa17c3f6cab1aa009ceb20f5ae3 /src/Text/Pandoc/Readers/Haddock.hs | |
parent | 4ba5ef46aeaf979bd74d8f4a5f6cea116527ddd3 (diff) | |
download | pandoc-2363e6a15bdde1c206d65461bd2e21f773dbc808.tar.gz |
Move CR filtering from tabFilter to the readers.
The readers previously assumed that CRs had been filtered
from the input. Now we strip the CRs in the readers themselves,
before parsing. (The point of this is just to simplify the
parsers.)
Shared now exports a new function `crFilter`. [API change]
And `tabFilter` no longer filters CRs.
Diffstat (limited to 'src/Text/Pandoc/Readers/Haddock.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/Haddock.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Haddock.hs b/src/Text/Pandoc/Readers/Haddock.hs index b22b71b96..a09ed8be9 100644 --- a/src/Text/Pandoc/Readers/Haddock.hs +++ b/src/Text/Pandoc/Readers/Haddock.hs @@ -27,7 +27,7 @@ import Text.Pandoc.Class (PandocMonad) import Text.Pandoc.Definition import Text.Pandoc.Error import Text.Pandoc.Options -import Text.Pandoc.Shared (splitBy, trim) +import Text.Pandoc.Shared (splitBy, trim, crFilter) -- | Parse Haddock markup and return a 'Pandoc' document. @@ -35,7 +35,7 @@ readHaddock :: PandocMonad m => ReaderOptions -> Text -> m Pandoc -readHaddock opts s = case readHaddockEither opts (unpack s) of +readHaddock opts s = case readHaddockEither opts (unpack (crFilter s)) of Right result -> return result Left e -> throwError e |