add latest changes from ~/bin and remove it from ~/bin - tttml - converters for a simpler syntax than markdown HTML git clone git://bitreich.org/tttml git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/tttml DIR Log DIR Files DIR Refs DIR Tags DIR README --- DIR commit 7b9791b74ab0b32f728884b0416ac55c9825f0d0 DIR parent e5f695470b3ce7553e2e1609b9341e957f5fceae HTML Author: Josuah Demangeon <mail@josuah.net> Date: Thu, 19 Apr 2018 03:57:29 +0200 add latest changes from ~/bin and remove it from ~/bin Diffstat: M markup-gopher | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) --- DIR diff --git a/markup-gopher b/markup-gopher @@ -28,21 +28,19 @@ match($0, "^\\[[^]]*\\]: ") { path = uri; type = "0"; sub("^[ \t]*", "", path); - if (match(path, "/$")) + if (match(uri, "/$")) type = "1"; - else if (match(path, "^[01789aghI]/")) { + else if (match(uri, "^[01789aghI]/")) { type = substr(path, 1, 1); - sub(".", "", path); - } - - if (sub("^gopher://", "", uri)) { + path = uri; sub(".", "", path); + } else if (sub("^gopher://", "", uri)) { host = uri; sub("/.*", "", host); path = uri; sub(".*/", "/", path); if (match(host, "[a-z.-]+:")) { port = substr(host, RLENGTH + 1); host = substr(host, RSTART, RLENGTH - 1); } - } else if (match(uri, "^[a-z0-9-]+:")) { + } else { type = "h"; host = ""; port = ""; path = "URL:" uri; }