aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index 2ca0d312a..4a7789e17 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -872,6 +872,7 @@ para = try $ do
newline
(blanklines >> return mempty)
<|> (guardDisabled Ext_blank_before_blockquote >> lookAhead blockQuote)
+ <|> (guardEnabled Ext_backtick_code_blocks >> lookAhead codeBlockFenced)
<|> (guardDisabled Ext_blank_before_header >> lookAhead header)
return $ do
result' <- result
@@ -1562,6 +1563,8 @@ endline = try $ do
guardDisabled Ext_lists_without_preceding_blankline <|> notFollowedBy listStart
guardEnabled Ext_blank_before_blockquote <|> notFollowedBy emailBlockQuoteStart
guardEnabled Ext_blank_before_header <|> notFollowedBy (char '#') -- atx header
+ guardEnabled Ext_backtick_code_blocks >>
+ notFollowedBy (() <$ (lookAhead (char '`') >> codeBlockFenced))
-- parse potential list-starts differently if in a list:
st <- getState
when (stateParserContext st == ListItemState) $ do