add latest changes from ~/bin and remove it from ~/bin - tttml - converters for… | |
git clone git://bitreich.org/tttml git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 7b9791b74ab0b32f728884b0416ac55c9825f0d0 | |
parent e5f695470b3ce7553e2e1609b9341e957f5fceae | |
Author: Josuah Demangeon <[email protected]> | |
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(-) | |
--- | |
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; | |
} |