diff options
| author | John MacFarlane <jgm@berkeley.edu> | 2022-03-31 10:11:13 -0700 |
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2022-03-31 10:11:48 -0700 |
| commit | ffa13769e6c208b89d55653af7663397831998ea (patch) | |
| tree | e6ad73bb3e4fbbf5bd1b06442874b443f7fc1035 /src | |
| parent | 8b21ec7d0cc43cdcee3fa4cc981e10e34f59f217 (diff) | |
RTF reader: increased stricness.
This leads to some performance improvements.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Text/Pandoc/Readers/RTF.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/RTF.hs b/src/Text/Pandoc/Readers/RTF.hs index 7408255ac..e781a9a09 100644 --- a/src/Text/Pandoc/Readers/RTF.hs +++ b/src/Text/Pandoc/Readers/RTF.hs @@ -269,7 +269,7 @@ tok = do unformattedText = do ts <- filter (\c -> c /= '\r' && c /= '\n') <$> ( many1 (satisfy (\c -> not (isSpecial c) || c == '\r' || c == '\n'))) - return $! UnformattedText $ T.pack ts + return $! UnformattedText $! T.pack ts grouped = do char '{' skipMany nl @@ -345,7 +345,7 @@ addFormatting (props, txt) = addText :: PandocMonad m => Text -> RTFParser m () addText t = do gs <- sGroupStack <$> getState - let props = case gs of + let !props = case gs of (x:_) -> x _ -> def updateState (\s -> s{ sTextContent = (props, t) : sTextContent s }) |
