diff options
author | Alexander Krotov <ilabdsf@gmail.com> | 2018-08-12 21:20:07 +0300 |
---|---|---|
committer | Alexander Krotov <ilabdsf@gmail.com> | 2018-08-12 21:20:07 +0300 |
commit | 81131ef5d19052948b4ac12a727e2ceef8a98186 (patch) | |
tree | 5f83eb066804ace386fb64803ac2637b8351239b /src/Text/Pandoc | |
parent | acf6df1aef337f71612f6d05c8aaa526255b3942 (diff) | |
download | pandoc-81131ef5d19052948b4ac12a727e2ceef8a98186.tar.gz |
Muse reader: don't allow digits after closing marker in lightweight markup
This change makes reader more compatible with Emacs Muse
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/Muse.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs index 4bb34af7e..01f9be41f 100644 --- a/src/Text/Pandoc/Readers/Muse.hs +++ b/src/Text/Pandoc/Readers/Muse.hs @@ -43,7 +43,7 @@ import Prelude import Control.Monad import Control.Monad.Except (throwError) import Data.Bifunctor -import Data.Char (isLetter) +import Data.Char (isLetter, isDigit) import Data.Default import Data.List (intercalate) import Data.List.Split (splitOn) @@ -841,7 +841,7 @@ enclosedInlines :: (PandocMonad m, Show a, Show b) -> MuseParser m b -> MuseParser m (F Inlines) enclosedInlines start end = try $ - trimInlinesF . mconcat <$> (enclosed (atStart start) end inline <* notFollowedBy (satisfy isLetter)) + trimInlinesF . mconcat <$> (enclosed (atStart start) end inline <* notFollowedBy (satisfy ((||) <$> isLetter <*> isDigit))) -- | Parse an inline tag, such as @\<em>@ and @\<strong>@. inlineTag :: PandocMonad m |