tttml

tools for formatting a very basic markdown-like format
Log | Files | Refs | README

commit ebfcd529de383bd42ba47eddceb51dd830d17614
parent 511bd8e715c9a935883982486c4544ad05b9b5f8
Author: Josuah Demangeon <mail@josuah.net>
Date:   Fri, 20 Apr 2018 13:21:52 +0200

always interprete scheme:// rui

Diffstat:
Mmarkup-gopher | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/markup-gopher b/markup-gopher @@ -28,9 +28,8 @@ match($0, "^\\[[^]]*\\]: ") { path = uri; type = "0"; sub("^[ \t]*", "", path); - if (match(uri, "/$")) - type = "1"; - else if (match(uri, "^[01789aghI]/")) { + + if (match(uri, "^[01789aghI]/")) { type = substr(path, 1, 1); path = uri; sub(".", "", path); } else if (sub("^gopher://", "", uri)) { @@ -40,6 +39,8 @@ match($0, "^\\[[^]]*\\]: ") { port = substr(host, RLENGTH + 1); host = substr(host, RSTART, RLENGTH - 1); } + } else if (match(uri, "/$")) { + type = "1"; } else { type = "h"; host = ""; port = ""; path = "URL:" uri;