diff options
author | sejo <sejo@texto-plano.xyz> | 2021-05-20 23:07:25 -0500 |
---|---|---|
committer | sejo <sejo@texto-plano.xyz> | 2021-05-20 23:07:25 -0500 |
commit | ca0548254584bf02889f0a107131a397479a91eb (patch) | |
tree | c62beba3b00ffccdd66dd5d106b1c2ae7a7e1248 /gemtext2html.awk | |
parent | 551bb8d15aaa25a5b71522078c99e97b1ce76344 (diff) | |
download | sitio-ca0548254584bf02889f0a107131a397479a91eb.tar.gz |
actualizaciones y tiempo
Diffstat (limited to 'gemtext2html.awk')
-rw-r--r-- | gemtext2html.awk | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gemtext2html.awk b/gemtext2html.awk index c1b44a7..714dc9f 100644 --- a/gemtext2html.awk +++ b/gemtext2html.awk @@ -154,14 +154,17 @@ NR == 1{ } appendContenido("<img src='"$1"' alt='"texto"' loading='lazy'/>") } - # si el path no es imagen - else{ + # si el path no es imagen y es .gmi + else if( match($1, /gmi$/) ){ # convierte enlace de .gmi a .html ! sub(".gmi$",".html",$1) # crea link <a> appendContenido("<p><a href='"$1"'>"texto"</a></p>") } + else{ + appendContenido("<p><a href='"$1"'>"texto"</a></p>") + } } else{ # link externo appendContenido("<p><a href='"$1"' rel=external target=_blank>"texto"</a></p>") |