Muse reader: do not allow headers in blockquotes (#3831)
This commit is contained in:
parent
38b6adaac0
commit
7a3a8790de
2 changed files with 8 additions and 2 deletions
|
@ -244,7 +244,7 @@ rightTag :: PandocMonad m => MuseParser m (F Blocks)
|
|||
rightTag = blockTag id "right"
|
||||
|
||||
quoteTag :: PandocMonad m => MuseParser m (F Blocks)
|
||||
quoteTag = blockTag B.blockQuote "quote"
|
||||
quoteTag = withQuoteContext InDoubleQuote $ blockTag B.blockQuote "quote"
|
||||
|
||||
commentTag :: PandocMonad m => MuseParser m (F Blocks)
|
||||
commentTag = parseHtmlContent "comment" anyChar >> return mempty
|
||||
|
|
|
@ -132,12 +132,18 @@ tests =
|
|||
, "Subsubsection" =:
|
||||
"***** Fifth level\n" =?>
|
||||
header 5 "Fifth level"
|
||||
, "No headers below top level" =:
|
||||
, "No headers in footnotes" =:
|
||||
T.unlines [ "Foo[1]"
|
||||
, "[1] * Bar"
|
||||
] =?>
|
||||
para (text "Foo" <>
|
||||
note (para "* Bar"))
|
||||
, "No headers in quotes" =:
|
||||
T.unlines [ "<quote>"
|
||||
, "* Hi"
|
||||
, "</quote>"
|
||||
] =?>
|
||||
blockQuote (para "* Hi")
|
||||
]
|
||||
, testGroup "Footnotes"
|
||||
[ "Simple footnote" =:
|
||||
|
|
Loading…
Add table
Reference in a new issue