md2html: add support for stand-alone pictures
This commit is contained in:
parent
0d4b08206d
commit
0e069e523a
9
md2html
9
md2html
@ -153,6 +153,15 @@ function inline(text) {
|
|||||||
next
|
next
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/^!\[.*\]\(.*\)$/ {
|
||||||
|
txt = $0
|
||||||
|
filenam = $0
|
||||||
|
gsub(/(^!\[|\].*$)/, "", txt)
|
||||||
|
gsub(/(^!.*\(|\)$)/, "", filenam)
|
||||||
|
oneliner("img",""," src=\"" escape(filenam) "\" alt=\"" escape(txt) "\"")
|
||||||
|
next
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
level(prefix "p")
|
level(prefix "p")
|
||||||
printf("%0" indent "s%s\n", "", inline($0))
|
printf("%0" indent "s%s\n", "", inline($0))
|
||||||
|
Loading…
Reference in New Issue
Block a user