aboutsummaryrefslogtreecommitdiffstats
path: root/gemtext2html.awk
diff options
context:
space:
mode:
authorsejo <sejo@texto-plano.xyz>2021-05-19 21:32:26 -0500
committersejo <sejo@texto-plano.xyz>2021-05-19 21:32:26 -0500
commit9b061476ed15875a18b5f48fb5bc8c3b9a86cabf (patch)
tree770178286a4ed0adb7327eda25dcd1078ec20777 /gemtext2html.awk
parent5e965ffa80a5c3142abc9f2f4bb67375a5193496 (diff)
downloadsitio-9b061476ed15875a18b5f48fb5bc8c3b9a86cabf.tar.gz
reemplaza espacios por _ en wikilinks
Diffstat (limited to 'gemtext2html.awk')
-rw-r--r--gemtext2html.awk4
1 files changed, 4 insertions, 0 deletions
diff --git a/gemtext2html.awk b/gemtext2html.awk
index 6241cfc..ebc1f39 100644
--- a/gemtext2html.awk
+++ b/gemtext2html.awk
@@ -21,6 +21,8 @@ BEGIN{
print "<head>"
print "<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />"
print "<meta content='initial-scale=1.0, maximum-scale=1.0, user-scalable=yes' name='viewport'/>"
+ print "<link rel='stylesheet' href='./static/estilo.css'>"
+ print "</head><body>"
contenido = "<main><section>"
nav = "<nav><ul>"
@@ -41,6 +43,8 @@ function wikiLink( t ){
prev = substr(t, 1, i-1) # string previa al link
link = substr(t, i, ifinal-i+1) # {link}
nombre = substr(t, i+1, ifinal-i-1) # link
+ gsub(" ","_",nombre) # reemplaza espacios por _
+
post = substr(t, ifinal+1) # string posterior
return prev "<a href='./" nombre ".html'>" link "</a>" post
Un proyecto texto-plano.xyz