md2html: Wrap images in <figure> tags

This commit is contained in:
Nero 2022-06-25 01:03:01 +00:00
parent 733ce1b119
commit c856e612af
1 changed files with 2 additions and 0 deletions

View File

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