Skip showing link URL in text

This commit is contained in:
cel 2020-05-19 20:49:51 -04:00
parent 4076c92f61
commit 7110814c69
1 changed files with 2 additions and 3 deletions

View File

@ -73,12 +73,11 @@ render_gemini() {
match($0, /^=>\s*/)
href = substr($0, RLENGTH+1)
if (match(href, /^\S+/)) {
text = substr(href, RLENGTH+1)
text = substr(href, RLENGTH+2)
href = substr(href, 0, RLENGTH)
}
link = href
sub(/:1965/, "", href)
printf "<div><a href=\"%s\">%s</a>%s</div>\n", href, link, text
printf "<div><a href=\"%s\">%s</a></div>\n", href, text
next
}
/^$/ {