Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Text/Pandoc/Readers/Markdown.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2086,7 +2086,7 @@ inlineNote = do
char '^'
updateState $ \st -> st{ stateInNote = True
, stateNoteNumber = stateNoteNumber st + 1 }
contents <- inBalancedBrackets inlines
contents <- withQuoteContext NoQuote $ inBalancedBrackets inlines
notFollowedBy (char '(' <|> char '[' <|> ('{' <$ attributes))
-- ^[link](foo)^ is superscript
updateState $ \st -> st{ stateInNote = False }
Expand Down
6 changes: 6 additions & 0 deletions test/Tests/Readers/Markdown.hs
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,12 @@ tests = [ testGroup "inline code"
, test markdownSmart "unclosed double quote"
("**this should \"be bold**"
=?> para (strong "this should \8220be bold"))
, test markdownSmart "single quote in inline note within single quotes" $ -- issue #11613
"'a^['b'.] c.'" =?>
para (singleQuoted ("a" <> note (para (singleQuoted "b" <> ".")) <> space <> "c."))
, test markdownSmart "double quote in inline note within double quotes" $ -- issue #11613
"\"a^[\"b\".] c.\"" =?>
para (doubleQuoted ("a" <> note (para (doubleQuoted "b" <> ".")) <> space <> "c."))
]
, testGroup "sub- and superscripts"
[
Expand Down