Catch URL in the middle of the text too - 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 c51820cd5d142538d17f8d33a43a11c890874b1d
(DIR) parent c9ff859e2a517b6e146c6814c6da77be05f7090d
(HTM) Author: Leonardo Taccari <iamleot@gmail.com>
Date: Sun, 16 Dec 2018 14:44:14
Catch URL in the middle of the text too
Diffstat:
twitter/tweets.dcgi | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff -r c9ff859e2a51 -r c51820cd5d14 twitter/tweets.dcgi
--- a/twitter/tweets.dcgi Sun Dec 16 14:26:40 2018 +0100
+++ b/twitter/tweets.dcgi Sun Dec 16 14:44:14 2018 +0100
@@ -84,7 +84,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];\""
+ cmd = cmd " | sed -E -e \"s;^(t)(.*)(https?://[^ ]+)(.*)$;[h|\\2\\3\\4|URL:\\3|server|port];\""
print text | cmd
close(cmd)