md2html: Support hrefs

This commit is contained in:
Nero 2022-04-07 16:05:26 +00:00
parent 40fd096894
commit 0d4b08206d

View File

@ -59,6 +59,7 @@ function inline(text) {
text = gensub(/\*\*([^\*]*)\*\*/, "<strong>\\1</strong>", "g", text)
text = gensub(/\*([^\*]*)\*/, "<em>\\1</em>", "g", text)
text = gensub(/`([^`]*)`/, "<code>\\1</code>", "g", text)
text = gensub(/\[(.*)\]\((.*)\)/, "<a href=\"\\2\">\\1</a>", "g", text)
return text
}