aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-08-12 21:20:07 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-08-12 21:20:07 +0300
commit81131ef5d19052948b4ac12a727e2ceef8a98186 (patch)
tree5f83eb066804ace386fb64803ac2637b8351239b /src/Text/Pandoc
parentacf6df1aef337f71612f6d05c8aaa526255b3942 (diff)
downloadpandoc-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.hs4
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