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
// Let marked do its normal token generation.
tokens = marked.lexer( content );
// Mark all code blocks as already being escaped.
// This prevents the parser from encoding anything inside code blocks
tokens.forEach(function( token ) {
if ( token.type === "code" ) {
token.escaped = true;
}
});
// Let marked do its normal parsing, but without encoding the code blocks
parsed = marked.parser( tokens );
Is there a case were <code> blocks should actually be escaped like that, really?
Shouldn't this be the default behaviour, without hacking?
Sorry I would have reopened #160 but couldn't.
Merc.
The text was updated successfully, but these errors were encountered:
Hi,
At the moment, in a code block, if you have:
It gets turned into:
Regardless of what
sanitize
is.In #160 (comment) @scottgonzalez suggested:
Is there a case were
<code>
blocks should actually be escaped like that, really?Shouldn't this be the default behaviour, without hacking?
Sorry I would have reopened #160 but couldn't.
Merc.
The text was updated successfully, but these errors were encountered: