diff options
author | Alexander Krotov <ilabdsf@gmail.com> | 2018-10-26 16:30:15 +0300 |
---|---|---|
committer | Alexander Krotov <ilabdsf@gmail.com> | 2018-10-26 16:30:15 +0300 |
commit | 1ca320e249ab72a33e46ca1e73d36b1a818ce008 (patch) | |
tree | dd252aa8c3404c40545f7f24ca6bff34f2339cdd /src | |
parent | 74396c7f90d410a4198b39db672d1a410b16a289 (diff) | |
download | pandoc-1ca320e249ab72a33e46ca1e73d36b1a818ce008.tar.gz |
Muse reader: parse page breaks
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Readers/Muse.hs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs index 818f66e20..29a6882dd 100644 --- a/src/Text/Pandoc/Readers/Muse.hs +++ b/src/Text/Pandoc/Readers/Muse.hs @@ -32,7 +32,6 @@ Conversion of Muse text to 'Pandoc' document. -} {- TODO: -- Page breaks (five "*") - Org tables - table.el tables - <cite> tag @@ -312,6 +311,7 @@ blockElements :: PandocMonad m => MuseParser m (F Blocks) blockElements = (mempty <$ blankline) <|> comment <|> separator + <|> pagebreak <|> example <|> exampleTag <|> literalTag @@ -342,6 +342,14 @@ separator = try $ pure B.horizontalRule <* many spaceChar <* eol +-- | Parse a page break +pagebreak :: PandocMonad m => MuseParser m (F Blocks) +pagebreak = try $ pure (B.divWith ("", [], [("style", "page-break-before: always;")]) mempty) + <$ count 6 spaceChar + <* many spaceChar + <* string "* * * * *" + <* manyTill spaceChar eol + headingStart :: PandocMonad m => MuseParser m (String, Int) headingStart = try $ (,) <$> option "" (try (parseAnchor <* manyTill spaceChar eol)) |