md2html: Wrap images in <figure> tags

This commit is contained in:
Nero 2022-06-25 01:03:01 +00:00
parent 733ce1b119
commit c856e612af

View File

@ -162,7 +162,9 @@ function inline(text) {
filenam = $0 filenam = $0
gsub(/(^!\[|\].*$)/, "", txt) gsub(/(^!\[|\].*$)/, "", txt)
gsub(/(^!.*\(|\)$)/, "", filenam) gsub(/(^!.*\(|\)$)/, "", filenam)
level(prefix "figure")
oneliner("img",""," src=\"" escape(filenam) "\" alt=\"" escape(txt) "\"") oneliner("img",""," src=\"" escape(filenam) "\" alt=\"" escape(txt) "\"")
oneliner("figcaption", txt, "")
next next
} }