md2html: Remove html entities for summary, input data is already escaped

This commit is contained in:
Nero 2024-03-27 08:52:16 +00:00
parent 2ea260dbf1
commit ee7a558a1d

View File

@ -233,16 +233,7 @@ function level(new) {
old = new
}
function escape(text) {
gsub(/&/, "\\&", text)
gsub(/</, "\\&lt;", text)
gsub(/>/, "\\&gt;", text)
gsub(/"/, "\\&quot;", text)
return text
}
function inline(text) {
text = escape(text)
text = gensub(/\*\*([^\*]*)\*\*/, "<strong>\\1</strong>", "g", text)
text = gensub(/\*([^\*]*)\*/, "<em>\\1</em>", "g", text)
text = gensub(/`([^`]*)`/, "<code>\\1</code>", "g", text)