aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2017-11-12 18:08:11 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2017-11-12 18:08:41 +0300
commitdf4cb20f297b4a33e0520e62ce3d5ac08bf2a8ee (patch)
treee784555a3141fbc594eae907d9e2fa28edbb1715 /src/Text/Pandoc/Readers
parentf13f142945a1a05ef7b54b720b1670d16a051225 (diff)
downloadpandoc-df4cb20f297b4a33e0520e62ce3d5ac08bf2a8ee.tar.gz
Muse reader: accept Emacs Muse definition lists
Emacs Muse does not require indentation.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/Muse.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs
index 6f4244ac3..6739bc41f 100644
--- a/src/Text/Pandoc/Readers/Muse.hs
+++ b/src/Text/Pandoc/Readers/Muse.hs
@@ -423,7 +423,8 @@ definitionListItem = try $ do
pure $ do lineContent' <- lineContent
pure (B.text term, [lineContent'])
where
- termParser = many1 spaceChar >> -- Initial space as required by Amusewiki, but not Emacs Muse
+ termParser = (guardEnabled Ext_emacs <|> void spaceChar) >> -- Initial space is required by Amusewiki, but not Emacs Muse
+ many spaceChar >>
many1Till anyChar (lookAhead (void (try (spaceChar >> string "::")) <|> void newline))
endOfInput = try $ skipMany blankline >> skipSpaces >> eof
twoBlankLines = try $ blankline >> skipMany1 blankline