You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that there are three elements in this example input: 2 HTML blocks and 1 table:
HTML block 1: <div><pre class=\"highlight ruby\"><code><span class=\"n\">foo</span>\n</code></pre></div>
Table: | Foo |\n| --- |\n| Bar |
HTML block 2: <div class=\"alert alert-info full-width\">\n <h5 class=\"card-title\">Foo</h5>\n <p>Blamco!</p>\n</div>
Within each HTML block, there is a \n character. Removing the \n from either of the HTML blocks causes the problem to go away.
I can confirm that this problem has been present since at least v2.3.0 (running the tests on older versions is difficult, since they rely on the deprecated rubygems source, and I'm not quite sure how to fix that)
Hello, for some reason, it seems that RedCarpet 3.5.1 can kind of get tripped up by html in the string, and the final string will be invalid HTML.
Basically:
Will print:
That last line is problematic. The
<p>
tag contains only a closing tag.The actual string returned is
"<div><div></div></div>\n"
Oddly, adding a newline between the first two
<div>
makes the problem go away. This isn't a workaround for generated code, but may help investigation:Prints:
The actual string returned is
"<div>\n<div></div>\n</div>\n"
Without the newline, between the two
</div>
, the problem also doesn't happen.Prints:
Actual string returned:
"<div><div></div></div>\n"
Regards
The text was updated successfully, but these errors were encountered: