Fixed two thunk leaks in RTF reader.
This further reduces memory usage. See #7943.
This commit is contained in:
parent
97a9b2e70f
commit
5fbea20e03
1 changed files with 4 additions and 4 deletions
|
@ -223,7 +223,7 @@ data TokContents =
|
|||
tok :: PandocMonad m => RTFParser m Tok
|
||||
tok = do
|
||||
pos <- getPosition
|
||||
Tok pos <$> ((controlThing <|> unformattedText <|> grouped) <* skipMany nl)
|
||||
Tok pos <$!> ((controlThing <|> unformattedText <|> grouped) <* skipMany nl)
|
||||
where
|
||||
controlThing = do
|
||||
char '\\' *>
|
||||
|
@ -255,9 +255,9 @@ tok = do
|
|||
let pstr = T.pack rest
|
||||
case TR.decimal pstr of
|
||||
Right (i,_) ->
|
||||
return $! Just $ if hyph
|
||||
then (-1) * i
|
||||
else i
|
||||
return $! Just $! if hyph
|
||||
then (-1) * i
|
||||
else i
|
||||
_ -> return $! Nothing
|
||||
hexVal = do
|
||||
char '\''
|
||||
|
|
Loading…
Add table
Reference in a new issue