@@ -32,7 +32,6 @@ TODO:
3232- {{{ }}} syntax for <example>
3333- Page breaks (five "*")
3434- Headings with anchors (make it round trip with Muse writer)
35−- Verse markup (">")
3635- Org tables
3736- table.el tables
3837- Images with attributes (floating and width)
@@ -181,6 +180,7 @@ blockElements = choice [ comment
181180 , rightTag
182181 , quoteTag
183182 , verseTag
183+ , lineBlock
184184 , bulletList
185185 , orderedList
186186 , definitionList
@@ -298,6 +298,26 @@ noteBlock = try $ do
298298 blocksTillNote =
299299 many1Till block (eof <|> () <$ lookAhead noteMarker)
300300
301+--
302+-- Verse markup
303+--
304+
305+lineVerseLine :: PandocMonad m => MuseParser m String
306+lineVerseLine = try $ do
307+ char '>'
308+ white <- many1 (char ' ' >> pure '\160')
309+ rest <- anyLine
310+ return $ tail white ++ rest
311+
312+blanklineVerseLine :: PandocMonad m => MuseParser m Char
313+blanklineVerseLine = try $ char '>' >> blankline
314+
315+lineBlock :: PandocMonad m => MuseParser m (F Blocks)
316+lineBlock = try $ do
317+ lns <- many1 (pure <$> blanklineVerseLine <|> lineVerseLine)
318+ lns' <- mapM (parseFromString' (trimInlinesF . mconcat <$> many inline)) lns
319+ return $ B.lineBlock <$> sequence lns'
320+
301321--
302322-- lists
303323--