From 6be013914513d2dd8ef7f141b1e3fd59cee7d3f7 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Sun, 15 Apr 2018 12:17:15 +0300 Subject: Muse reader: require that comment semicolons are in the first column Fixes #4551 --- src/Text/Pandoc/Readers/Muse.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Text') 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 -- cgit v1.2.3