aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-04-15 12:17:15 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-04-15 12:17:33 +0300
commit6be013914513d2dd8ef7f141b1e3fd59cee7d3f7 (patch)
tree6e1ac9c5f9e33fb0a4ab7612d9da3e70094e4826 /src/Text
parent34d8ffbcfc33b86766ff7229be4d8a0d1fbffb50 (diff)
downloadpandoc-6be013914513d2dd8ef7f141b1e3fd59cee7d3f7.tar.gz
Muse reader: require that comment semicolons are in the first column
Fixes #4551
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Readers/Muse.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs
index 9763652bc..0da8bbdcc 100644
--- a/src/Text/Pandoc/Readers/Muse.hs
+++ b/src/Text/Pandoc/Readers/Muse.hs
@@ -348,6 +348,7 @@ blockElements = do
-- | Parse a line comment, starting with @;@ in the first column.
comment :: PandocMonad m => MuseParser m (F Blocks)
comment = try $ do
+ getPosition >>= \pos -> guard (sourceColumn pos == 1)
char ';'
optional (spaceChar >> many (noneOf "\n"))
eol