@@ -32,7 +32,6 @@ Conversion of Muse text to 'Pandoc' document.
3232-}
3333{-
3434TODO:
35−- Page breaks (five "*")
3635- Org tables
3736- table.el tables
3837- <cite> tag
@@ -312,6 +311,7 @@ blockElements :: PandocMonad m => MuseParser m (F Blocks)
312311blockElements = (mempty <$ blankline)
313312 <|> comment
314313 <|> separator
314+ <|> pagebreak
315315 <|> example
316316 <|> exampleTag
317317 <|> literalTag
@@ -342,6 +342,14 @@ separator = try $ pure B.horizontalRule
342342 <* many spaceChar
343343 <* eol
344344
345+-- | Parse a page break
346+pagebreak :: PandocMonad m => MuseParser m (F Blocks)
347+pagebreak = try $ pure (B.divWith ("", [], [("style", "page-break-before: always;")]) mempty)
348+ <$ count 6 spaceChar
349+ <* many spaceChar
350+ <* string "* * * * *"
351+ <* manyTill spaceChar eol
352+
345353headingStart :: PandocMonad m => MuseParser m (String, Int)
346354headingStart = try $ (,)
347355 <$> option "" (try (parseAnchor <* manyTill spaceChar eol))