@@ -32,7 +32,7 @@ TODO:
32- {{{ }}} syntax for <example>
32- {{{ }}} syntax for <example>
33- Page breaks (five "*")
33- Page breaks (five "*")
34- Headings with anchors (make it round trip with Muse writer)
34- Headings with anchors (make it round trip with Muse writer)
35−- <verse> and ">"
35+- Verse markup (">")
36- Org tables
36- Org tables
37- table.el tables
37- table.el tables
38- Images with attributes (floating and width)
38- Images with attributes (floating and width)
@@ -180,6 +180,7 @@ blockElements = choice [ comment
180 , centerTag
180 , centerTag
181 , rightTag
181 , rightTag
182 , quoteTag
182 , quoteTag
183 , bulletList
184 , bulletList
184 , orderedList
185 , orderedList
185 , definitionList
186 , definitionList
@@ -244,6 +245,25 @@ rightTag = blockTag id "right"
244quoteTag :: PandocMonad m => MuseParser m (F Blocks)
245quoteTag :: PandocMonad m => MuseParser m (F Blocks)
245quoteTag = withQuoteContext InDoubleQuote $ blockTag B.blockQuote "quote"
246quoteTag = withQuoteContext InDoubleQuote $ blockTag B.blockQuote "quote"
248+verseLine :: PandocMonad m => MuseParser m String
250+ line <- anyLine <|> many1Till anyChar eof
251+ let (white, rest) = span (== ' ') line
252+ return $ replicate (length white) '\160' ++ rest
254+verseLines :: PandocMonad m => MuseParser m (F Blocks)
256+ optionMaybe blankline -- Skip blankline after opening tag on separate line
257+ lns <- many verseLine
258+ lns' <- mapM (parseFromString' (trimInlinesF . mconcat <$> many inline)) lns
259+ return $ B.lineBlock <$> sequence lns'
261+verseTag :: PandocMonad m => MuseParser m (F Blocks)
263+ (_, content) <- htmlElement "verse"
264+ parsedContent <- parseFromString verseLines content
265+ return parsedContent
247commentTag :: PandocMonad m => MuseParser m (F Blocks)
267commentTag :: PandocMonad m => MuseParser m (F Blocks)
248commentTag = parseHtmlContent "comment" anyChar >> return mempty
268commentTag = parseHtmlContent "comment" anyChar >> return mempty