Markdown parser, done right. 100% CommonMark support, extensions, syntax plugins & high speed https://markdown-it.github.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

18 lines
406 B

// Process < > " (& was processed in markdown escape)
module.exports = function escape_html_char(state) {
var ch = state.src.charCodeAt(state.pos);
if (ch === 0x3C/* < */) {
state.pending += '&lt;';
} else if (ch === 0x3E/* > */) {
state.pending += '&gt;';
} else if (ch === 0x22/* " */) {
state.pending += '&quot;';
} else {
return false;
}
state.pos++;
return true;
};