diff options
author | cel <cel@lOUVT+Phkvai9a/cCS/RKo+S9hnPAQdVixms/7ldpPA=.ed25519> | 2020-05-19 20:49:51 -0400 |
---|---|---|
committer | cel <cel@lOUVT+Phkvai9a/cCS/RKo+S9hnPAQdVixms/7ldpPA=.ed25519> | 2020-05-19 20:50:22 -0400 |
commit | 7110814c69398f04cb2b100e233c34f97ad6ccd1 (patch) | |
tree | 51db3c06a47b59cc8be788196f4d4fd27b35f0a3 | |
parent | 4076c92f6186391041776ca960af85200237033a (diff) |
Skip showing link URL in text
-rwxr-xr-x | gemini.filter.dpi | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gemini.filter.dpi b/gemini.filter.dpi index 3500900..17e5c5a 100755 --- a/gemini.filter.dpi +++ b/gemini.filter.dpi @@ -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 } /^$/ { |