git.iko.soy/typeable/pandoc
on master help sign in
Revert "Commonmark reader: parse HTML as plain text if `-raw_html`."

This reverts commit 6dd21250288b51f10056b15a83130f76c788d904.

commit987140eadc0af868af55d6ac52414382eb1f855c authorJohn MacFarlane <jgm@berkeley.edu> dateFri 2 Mar 2018, 19:35 (9 years ago) parent6dd2125
2 files changed+2−10
changelog−8 src/Text/Pandoc/Readers/CommonMark.hs+2−2
changelog−8
@@ -7,14 +7,6 @@ pandoc (2.1.2)
77 interfered with list parsing, so now we require the fences to be flush with
88 the margin of the containing block.
99
10− * Commonmark reader:
11−
12− + `raw_html` is now on by default. It can be disabled explicitly
13− using `-f commonmark-raw_html`.
14− + When `raw_html` is disabled, HTML is parsed as regular text,
15− rather than disappearing altogether. This matches the behavior
16− of `markdown`.
17−
1810 * Org reader (Albert Krewinkel):
1911
2012 + Move citation tests to separate module.
src/Text/Pandoc/Readers/CommonMark.hs+2−2
@@ -109,7 +109,7 @@ addBlock opts (Node _ BLOCK_QUOTE nodes) =
109109 (BlockQuote (addBlocks opts nodes) :)
110110addBlock opts (Node _ (HTML_BLOCK t) _)
111111 | isEnabled Ext_raw_html opts = (RawBlock (Format "html") (unpack t) :)
112− | otherwise = (Para [Str (unpack t)] :)
112+ | otherwise = id
113113-- Note: the cmark parser will never generate CUSTOM_BLOCK,
114114-- so we don't need to handle it:
115115addBlock _ (Node _ (CUSTOM_BLOCK _onEnter _onExit) _nodes) =
@@ -215,7 +215,7 @@ addInline opts (Node _ SOFTBREAK _)
215215 | otherwise = (SoftBreak :)
216216addInline opts (Node _ (HTML_INLINE t) _)
217217 | isEnabled Ext_raw_html opts = (RawInline (Format "html") (unpack t) :)
218− | otherwise = (Str (unpack t) :)
218+ | otherwise = id
219219-- Note: the cmark parser will never generate CUSTOM_BLOCK,
220220-- so we don't need to handle it:
221221addInline _ (Node _ (CUSTOM_INLINE _onEnter _onExit) _nodes) =