convert from uri to path and not path to path - tttml - converters for a simpler syntax than markdown
(HTM) git clone git://bitreich.org/tttml git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/tttml
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Tags
(DIR) README
---
(DIR) commit 332be10e3e3139840a4f021f6f6108fcfb32d064
(DIR) parent bd5225db743ed20a10451c667dcd8de42c6e1437
(HTM) Author: Josuah Demangeon <mail@josuah.net>
Date: Fri, 20 Apr 2018 14:42:16 +0200
convert from uri to path and not path to path
Diffstat:
M markup-gopher | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/markup-gopher b/markup-gopher
@@ -27,11 +27,11 @@ match($0, "^\\[[^]]*\\]: ") {
port = PORT; tag = substr($0, 2, RLENGTH - 4);
path = uri; type = "0";
- sub("^[ \t]*", "", path);
+ sub("^[ \t]*", "", uri);
if (match(uri, "^[01789aghI]/")) {
path = uri; sub(".", "", path);
- type = substr(path, 1, 1);
+ type = substr(uri, 1, 1);
} else if (sub("^gopher://", "", uri)) {
path = uri; sub(".*/", "/", path);
host = uri; sub("/.*", "", host);