aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-01-18 15:35:43 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-01-18 15:35:43 +0300
commita516198d47bcc31e72e56e04bde976d9178142aa (patch)
treea0acc3492b4ce79cdbf8e78e3da49015ddc0e206 /src/Text/Pandoc
parent5f57094a47c18d1849f7cd5e9306bf05d6187881 (diff)
downloadpandoc-a516198d47bcc31e72e56e04bde976d9178142aa.tar.gz
Muse reader: fix parsing of code at the beginning of paragraph
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/Muse.hs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs
index b06b6e550..d378fe676 100644
--- a/src/Text/Pandoc/Readers/Muse.hs
+++ b/src/Text/Pandoc/Readers/Muse.hs
@@ -718,17 +718,13 @@ nbsp = try $ do
code :: PandocMonad m => MuseParser m (F Inlines)
code = try $ do
- pos <- getPosition
- sp <- if sourceColumn pos == 1
- then pure mempty
- else skipMany1 spaceChar >> pure B.space
- char '='
+ atStart $ char '='
contents <- many1Till (noneOf "\n\r" <|> (newline <* notFollowedBy newline)) $ char '='
guard $ not $ null contents
guard $ head contents `notElem` " \t\n"
guard $ last contents `notElem` " \t\n"
notFollowedBy $ satisfy isLetter
- return $ return (sp B.<> B.code contents)
+ return $ return $ B.code contents
codeTag :: PandocMonad m => MuseParser m (F Inlines)
codeTag = do