Add link to possible leading http:// and https:// URL - gophercgis - Collection of gopher CGI/DCGI for geomyidae
(HTM) hg clone https://bitbucket.org/iamleot/gophercgis
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) changeset fd54e4bc8d5ae69eb8ccdde0f48eb5250b357601
(DIR) parent 2b194b6f79152bbea13f0e56bfebcf150a1050c6
(HTM) Author: Leonardo Taccari <iamleot@gmail.com>
Date: Sun, 16 Dec 2018 11:49:30
Add link to possible leading http:// and https:// URL
XXX: It would be nice to also support URL that are in the middle of the line.
Diffstat:
twitter/tweets.dcgi | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff -r 2b194b6f7915 -r fd54e4bc8d5a twitter/tweets.dcgi
--- a/twitter/tweets.dcgi Sun Dec 16 11:05:49 2018 +0100
+++ b/twitter/tweets.dcgi Sun Dec 16 11:49:30 2018 +0100
@@ -57,6 +57,7 @@
{
cmd = "par -d 0 -B=. -w 72"
cmd = cmd " | sed -e \"s/^/t/\""
+ cmd = cmd " | sed -E -e \"s;^(t)(https?://[^ ]+)(.*)$;[h|\\2\\3|URL:\\2|server|port];\""
print text | cmd
close(cmd)