aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-10-31 12:58:49 +0300
committerJohn MacFarlane <jgm@berkeley.edu>2018-11-03 10:17:32 -0700
commit9a004b86c92119a499d91ae075b5e68c81136795 (patch)
tree36d1782024172582f004cc9cdacbf46ec24b836a /src
parent5686bdfc97caae0d835629a2b14beed17be5f270 (diff)
downloadpandoc-9a004b86c92119a499d91ae075b5e68c81136795.tar.gz
Vimwiki reader: parse Text without converting to [Char]
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/Vimwiki.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/Vimwiki.hs b/src/Text/Pandoc/Readers/Vimwiki.hs
index 6fdbcb50e..7edc50bff 100644
--- a/src/Text/Pandoc/Readers/Vimwiki.hs
+++ b/src/Text/Pandoc/Readers/Vimwiki.hs
@@ -71,7 +71,7 @@ import Control.Monad.Except (throwError)
import Data.Default
import Data.List (isInfixOf, isPrefixOf)
import Data.Maybe
-import Data.Text (Text, unpack)
+import Data.Text (Text)
import Text.Pandoc.Builder (Blocks, Inlines, fromList, toList, trimInlines)
import qualified Text.Pandoc.Builder as B (blockQuote, bulletList, code,
codeBlockWith, definitionList,
@@ -101,13 +101,12 @@ import Text.Parsec.Prim (getState, many, try, updateState, (<|>))
readVimwiki :: PandocMonad m => ReaderOptions -> Text -> m Pandoc
readVimwiki opts s = do
- res <- readWithM parseVimwiki def{ stateOptions = opts }
- (unpack (crFilter s))
+ res <- readWithM parseVimwiki def{ stateOptions = opts } $ crFilter s
case res of
Left e -> throwError e
Right result -> return result
-type VwParser = ParserT [Char] ParserState
+type VwParser = ParserT Text ParserState
-- constants