diff options
| author | John MacFarlane <jgm@berkeley.edu> | 2021-09-19 10:11:29 -0700 | 
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2021-09-19 10:12:07 -0700 | 
| commit | c9ce6da1bb69edd5d81952e164fb32c3a0a8f344 (patch) | |
| tree | 91f248a7c0c8b6fc1aec6551f3f43113fa7da019 /src/Text/Pandoc/Readers | |
| parent | 132a6df51e52463178711a648e848f6f73299dc8 (diff) | |
| download | pandoc-c9ce6da1bb69edd5d81952e164fb32c3a0a8f344.tar.gz | |
LaTeX reader: Recognize that `\vadjust` sometimes takes "pre".
Closes #7531.
Diffstat (limited to 'src/Text/Pandoc/Readers')
| -rw-r--r-- | src/Text/Pandoc/Readers/LaTeX/Parsing.hs | 7 | 
1 files changed, 7 insertions, 0 deletions
| diff --git a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs index 9b84cdd21..7366d7b2d 100644 --- a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs +++ b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs @@ -941,6 +941,9 @@ getRawCommand name txt = do               void $ count 4 braced             "def" ->               void $ manyTill anyTok braced +           "vadjust" -> +             void (manyTill anyTok braced) <|> +                void (satisfyTok isPreTok) -- see #7531             _ | isFontSizeCommand name -> return ()               | otherwise -> do                 skipopts @@ -948,6 +951,10 @@ getRawCommand name txt = do                 void $ many braced    return $ txt <> untokenize rawargs +isPreTok :: Tok -> Bool +isPreTok (Tok _ Word "pre") = True +isPreTok _ = False +  isDigitTok :: Tok -> Bool  isDigitTok (Tok _ Word t) = T.all isDigit t  isDigitTok _              = False | 
