diff options
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Parsing.hs | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs index 3dd129529..5ad6af891 100644 --- a/src/Text/Pandoc/Parsing.hs +++ b/src/Text/Pandoc/Parsing.hs @@ -939,44 +939,3 @@ applyMacros' target = do return $ applyMacros macros target else return target ----- pandoc2 block sep/line end parsers -{- - --- | Push parser onto stack of endline parsers. --- These are applied after a newline within a block. -pushEndline :: PMonad m => P t m () -> P t m () -pushEndline p = modifyState $ \st -> st{ sEndline = sEndline st |> p } - --- | Pop parser off stack of endline parsers. -popEndline :: PMonad m => P t m () -popEndline = do - st <- getState - case viewr (sEndline st) of - EmptyR -> logM ERROR "Tried to pop empty pEndline stack" - ps :> _ -> setState st{ sEndline = ps } - --- | Apply a parser in a context with a specified endline parser. -withEndline :: PMonad m => P t m a -> P t m b -> P t m b -withEndline sep p = pushEndline (() <$ sep) *> p <* popEndline - --- | Push parser onto stack of block separator parsers. --- These are applied after a newline following a block. -pushBlockSep :: PMonad m => P t m () -> P t m () -pushBlockSep p = modifyState $ \st -> st{ sBlockSep = sBlockSep st |> p } - --- | Pop parser off of stack of block separator parsers. -popBlockSep :: PMonad m => P t m () -popBlockSep = do - st <- getState - case viewr (sBlockSep st) of - EmptyR -> logM ERROR "Tried to pop empty pBlockSep stack" - ps :> _ -> setState st{ sBlockSep = ps } - --- | Apply a parser in a context with specified block separator parser. -withBlockSep :: PMonad m => P t m a -> P t m b -> P t m b -withBlockSep sep p = pushBlockSep (() <$ sep) *> p <* popBlockSep - --- | Parse a block separator. -pBlockSep :: PMonad m => P t m () -pBlockSep = try (getState >>= sequenceA . sBlockSep) >> return () --} |