diff --git a/index.compiler.spec.js b/index.compiler.spec.js index 7dbf4b62..a43df46b 100644 --- a/index.compiler.spec.js +++ b/index.compiler.spec.js @@ -2389,6 +2389,18 @@ $25 new Date(); +`); + }); + + it('does not parse the inside of '].join('\n'))); + + expect(root.innerHTML).toMatchInlineSnapshot(` + + + `); }); diff --git a/index.js b/index.js index 32d9d0e3..4f0f92b5 100644 --- a/index.js +++ b/index.js @@ -1025,8 +1025,9 @@ export function compiler(markdown, options) { ? parseBlock : parseInline; + const tagName = capture[1].toLowerCase(); const noInnerParse = - DO_NOT_PROCESS_HTML_ELEMENTS.indexOf(capture[1]) !== -1; + DO_NOT_PROCESS_HTML_ELEMENTS.indexOf(tagName) !== -1; return { attrs: attrStringToMap(capture[2]), @@ -1038,7 +1039,7 @@ export function compiler(markdown, options) { noInnerParse, - tag: capture[1], + tag: noInnerParse ? tagName : capture[1] }; }, react(node, output, state) {