aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/Muse.hs12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs
index 6e7844d4b..6f9b9b3c2 100644
--- a/src/Text/Pandoc/Readers/Muse.hs
+++ b/src/Text/Pandoc/Readers/Muse.hs
@@ -35,7 +35,6 @@ TODO:
- Org tables
- table.el tables
- Images with attributes (floating and width)
-- Anchors
- Citations and <biblio>
- <play> environment
-}
@@ -535,6 +534,7 @@ tableParseCaption = try $ do
inline :: PandocMonad m => MuseParser m (F Inlines)
inline = choice [ br
+ , anchor
, footnote
, strong
, strongTag
@@ -552,6 +552,16 @@ inline = choice [ br
, symbol
] <?> "inline"
+anchor :: PandocMonad m => MuseParser m (F Inlines)
+anchor = try $ do
+ getPosition >>= \pos -> guard (sourceColumn pos == 1)
+ char '#'
+ first <- letter
+ rest <- many (letter <|> digit)
+ skipMany spaceChar <|> void newline
+ let anchorId = first:rest
+ return $ return $ B.spanWith (anchorId, [], []) mempty
+
footnote :: PandocMonad m => MuseParser m (F Inlines)
footnote = try $ do
ref <- noteMarker