md2html: Remove html entities for summary, input data is already escaped
This commit is contained in:
parent
2ea260dbf1
commit
ee7a558a1d
9
md2html
9
md2html
@ -233,16 +233,7 @@ function level(new) {
|
|||||||
old = new
|
old = new
|
||||||
}
|
}
|
||||||
|
|
||||||
function escape(text) {
|
|
||||||
gsub(/&/, "\\&", text)
|
|
||||||
gsub(/</, "\\<", text)
|
|
||||||
gsub(/>/, "\\>", text)
|
|
||||||
gsub(/"/, "\\"", text)
|
|
||||||
return text
|
|
||||||
}
|
|
||||||
|
|
||||||
function inline(text) {
|
function inline(text) {
|
||||||
text = escape(text)
|
|
||||||
text = gensub(/\*\*([^\*]*)\*\*/, "<strong>\\1</strong>", "g", text)
|
text = gensub(/\*\*([^\*]*)\*\*/, "<strong>\\1</strong>", "g", text)
|
||||||
text = gensub(/\*([^\*]*)\*/, "<em>\\1</em>", "g", text)
|
text = gensub(/\*([^\*]*)\*/, "<em>\\1</em>", "g", text)
|
||||||
text = gensub(/`([^`]*)`/, "<code>\\1</code>", "g", text)
|
text = gensub(/`([^`]*)`/, "<code>\\1</code>", "g", text)
|
||||||
|
Loading…
Reference in New Issue
Block a user