aboutsummaryrefslogtreecommitdiffstats
path: root/gemtext2html.awk
diff options
context:
space:
mode:
Diffstat (limited to 'gemtext2html.awk')
-rw-r--r--gemtext2html.awk7
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>")
Un proyecto texto-plano.xyz