diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-09-11 10:57:19 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-11 10:57:19 -0700 |
commit | 1307b023af801d8eabeef7404478c4d923c82b0a (patch) | |
tree | a15c38a2e2c7f7be8648d32685a5ecfd5e0891b2 /src/Text/Pandoc/Readers | |
parent | 7df095f049d8499972af966d4622d20b5a465900 (diff) | |
parent | 8e4ee6656399e897367ea874fe494c35e2715ac9 (diff) | |
download | pandoc-1307b023af801d8eabeef7404478c4d923c82b0a.tar.gz |
Merge pull request #3917 from labdsf/muse-reader-emphasis-word
Muse reader: allow inline markup to be followed by punctuation
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/Muse.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs index ab9a51bad..02ac783dd 100644 --- a/src/Text/Pandoc/Readers/Muse.hs +++ b/src/Text/Pandoc/Readers/Muse.hs @@ -45,6 +45,7 @@ module Text.Pandoc.Readers.Muse (readMuse) where import Control.Monad import Control.Monad.Except (throwError) import qualified Data.Map as M +import Data.Char (isLetter) import Data.Text (Text, unpack) import Data.List (stripPrefix) import Data.Maybe (fromMaybe) @@ -582,7 +583,7 @@ enclosedInlines :: (PandocMonad m, Show a, Show b) -> MuseParser m b -> MuseParser m (F Inlines) enclosedInlines start end = try $ - trimInlinesF . mconcat <$> enclosed start end inline + trimInlinesF . mconcat <$> (enclosed start end inline <* notFollowedBy (satisfy isLetter)) inlineTag :: PandocMonad m => (Inlines -> Inlines) @@ -629,7 +630,7 @@ code = try $ do guard $ not $ null contents guard $ head contents `notElem` " \t\n" guard $ last contents `notElem` " \t\n" - notFollowedBy nonspaceChar + notFollowedBy $ satisfy isLetter return $ return (sp B.<> B.code contents) codeTag :: PandocMonad m => MuseParser m (F Inlines) |