
13 changed files with 156 additions and 154 deletions
@ -1,18 +1,20 @@ |
|||||
// Process < > " (& was processed in markdown escape)
|
// Process < > " (& was processed in markdown escape)
|
||||
|
|
||||
module.exports = function escape_html_char(state) { |
module.exports = function escape_html_char(state, silent) { |
||||
var ch = state.src.charCodeAt(state.pos); |
var ch = state.src.charCodeAt(state.pos), |
||||
|
str; |
||||
|
|
||||
if (ch === 0x3C/* < */) { |
if (ch === 0x3C/* < */) { |
||||
state.pending += '<'; |
str = '<'; |
||||
} else if (ch === 0x3E/* > */) { |
} else if (ch === 0x3E/* > */) { |
||||
state.pending += '>'; |
str = '>'; |
||||
} else if (ch === 0x22/* " */) { |
} else if (ch === 0x22/* " */) { |
||||
state.pending += '"'; |
str = '"'; |
||||
} else { |
} else { |
||||
return false; |
return false; |
||||
} |
} |
||||
|
|
||||
|
if (!silent) { state.pending += str; } |
||||
state.pos++; |
state.pos++; |
||||
return true; |
return true; |
||||
}; |
}; |
||||
|
Loading…
Reference in new issue