diff options
author | sejo <sejo@texto-plano.xyz> | 2021-05-19 21:32:26 -0500 |
---|---|---|
committer | sejo <sejo@texto-plano.xyz> | 2021-05-19 21:32:26 -0500 |
commit | 9b061476ed15875a18b5f48fb5bc8c3b9a86cabf (patch) | |
tree | 770178286a4ed0adb7327eda25dcd1078ec20777 /gemtext2html.awk | |
parent | 5e965ffa80a5c3142abc9f2f4bb67375a5193496 (diff) | |
download | sitio-9b061476ed15875a18b5f48fb5bc8c3b9a86cabf.tar.gz |
reemplaza espacios por _ en wikilinks
Diffstat (limited to 'gemtext2html.awk')
-rw-r--r-- | gemtext2html.awk | 4 |
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 |