diff options
author | John MacFarlane <jgm@berkeley.edu> | 2020-11-16 22:36:10 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2020-11-16 22:36:10 -0800 |
commit | c9ada73caca108b912d4c1289cffc9a7fcd66ce0 (patch) | |
tree | 1ae6ff8611c2fb90829e8305e81caa5849262ff5 /src/Text/Pandoc/Readers/LaTeX.hs | |
parent | 57102d6ac46e3d8caf4755e46e830a10f1d7517c (diff) | |
download | pandoc-c9ada73caca108b912d4c1289cffc9a7fcd66ce0.tar.gz |
Move getNextNumber from Readers.LaTeX to Readers.LaTeX.Parsing.
Diffstat (limited to 'src/Text/Pandoc/Readers/LaTeX.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 38e2435e3..61c9abe3a 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -1923,32 +1923,6 @@ addImageCaption = walkM go return $ Image attr' alt' (src, tit') go x = return x -getNextNumber :: Monad m - => (LaTeXState -> DottedNum) -> LP m DottedNum -getNextNumber getCurrentNum = do - st <- getState - let chapnum = - case sLastHeaderNum st of - DottedNum (n:_) | sHasChapters st -> Just n - _ -> Nothing - return . DottedNum $ - case getCurrentNum st of - DottedNum [m,n] -> - case chapnum of - Just m' | m' == m -> [m, n+1] - | otherwise -> [m', 1] - Nothing -> [1] - -- shouldn't happen - DottedNum [n] -> - case chapnum of - Just m -> [m, 1] - Nothing -> [n + 1] - _ -> - case chapnum of - Just n -> [n, 1] - Nothing -> [1] - - coloredBlock :: PandocMonad m => Text -> LP m Blocks coloredBlock stylename = try $ do skipopts |