git.iko.soy/typeable/pandoc
on master help sign in
Muse reader: do not allow headers in blockquotes (#3831)
commit7a3a8790de175c9a21d13786214fdea4bb157b3d authorAlexander Krotov <ilabdsf@gmail.com> dateFri 4 Aug 2017, 01:41 (9 years ago) parent38b6ada
2 files changed+8−2
src/Text/Pandoc/Readers/Muse.hs+1−1 test/Tests/Readers/Muse.hs+7−1
src/Text/Pandoc/Readers/Muse.hs+1−1
@@ -244,7 +244,7 @@ rightTag :: PandocMonad m => MuseParser m (F Blocks)
244244rightTag = blockTag id "right"
245245
246246quoteTag :: PandocMonad m => MuseParser m (F Blocks)
247−quoteTag = blockTag B.blockQuote "quote"
247+quoteTag = withQuoteContext InDoubleQuote $ blockTag B.blockQuote "quote"
248248
249249commentTag :: PandocMonad m => MuseParser m (F Blocks)
250250commentTag = parseHtmlContent "comment" anyChar >> return mempty
test/Tests/Readers/Muse.hs+7−1
@@ -132,12 +132,18 @@ tests =
132132 , "Subsubsection" =:
133133 "***** Fifth level\n" =?>
134134 header 5 "Fifth level"
135− , "No headers below top level" =:
135+ , "No headers in footnotes" =:
136136 T.unlines [ "Foo[1]"
137137 , "[1] * Bar"
138138 ] =?>
139139 para (text "Foo" <>
140140 note (para "* Bar"))
141+ , "No headers in quotes" =:
142+ T.unlines [ "<quote>"
143+ , "* Hi"
144+ , "</quote>"
145+ ] =?>
146+ blockQuote (para "* Hi")
141147 ]
142148 , testGroup "Footnotes"
143149 [ "Simple footnote" =: