diff options
author | John MacFarlane <jgm@berkeley.edu> | 2013-11-22 19:41:08 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2013-11-22 19:41:08 -0800 |
commit | cf149fcf38d98b1bee79ecd9056fa0f46264e7ce (patch) | |
tree | f8e100ecd0f61f13039498676afcf0cca2fd7247 /src/Text/Pandoc | |
parent | 3d453f096cfa12e231c5a4d4c8e468378e20e5e8 (diff) | |
download | pandoc-cf149fcf38d98b1bee79ecd9056fa0f46264e7ce.tar.gz |
Fixed bug with intraword emphasis.
Closes #1066.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index ea49d8c1d..33d1a9620 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -1455,6 +1455,7 @@ enclosure c = do -- Parse inlines til you hit one c or a sequence of two cs. -- If one c, emit emph and then parse two. -- If two cs, emit strong and then parse one. +-- Otherwise, emit ccc then the results. three :: Char -> MarkdownParser (F Inlines) three c = do contents <- mconcat <$> many (notFollowedBy (char c) >> inline) @@ -1479,7 +1480,7 @@ one c prefix' = do contents <- mconcat <$> many ( (notFollowedBy (char c) >> inline) <|> try (string [c,c] >> notFollowedBy (char c) >> - two c prefix') ) + two c mempty) ) (char c >> return (B.emph <$> (prefix' <> contents))) <|> return (return (B.str [c]) <> (prefix' <> contents)) |