aboutsummaryrefslogtreecommitdiffstats
path: root/gemtext2html.awk
diff options
context:
space:
mode:
authorsejo <sejo@texto-plano.xyz>2021-05-19 20:35:27 -0500
committersejo <sejo@texto-plano.xyz>2021-05-19 20:35:27 -0500
commit9b772d64cc224aa8d87d7c36c612f39963f7f91e (patch)
tree5e3efcc4ed2be4aa2da2dadef36e7ab5dbbb9c15 /gemtext2html.awk
parenteb41e8b03bbcba93d23d04cb616e1400e4ff204e (diff)
downloadsitio-9b772d64cc224aa8d87d7c36c612f39963f7f91e.tar.gz
formatea links externos
Diffstat (limited to 'gemtext2html.awk')
-rw-r--r--gemtext2html.awk5
1 files changed, 5 insertions, 0 deletions
diff --git a/gemtext2html.awk b/gemtext2html.awk
index 02271cf..b4e1db2 100644
--- a/gemtext2html.awk
+++ b/gemtext2html.awk
@@ -111,6 +111,8 @@ $0 !~ /^(=>|```|#{1,3} |* |>|[[:blank:]]*$)/{ # líneas de texto (no "especiales
modo_parrafo = 0
appendContenido( "</p>" )
}
+ bloque = 1
+
# borra flecha del inicio
sub("^=>","",$0)
# ahora $1 es el path, $2 a $NF el texto
@@ -136,6 +138,9 @@ $0 !~ /^(=>|```|#{1,3} |* |>|[[:blank:]]*$)/{ # líneas de texto (no "especiales
$0="<p><a href='"$1"'>"texto"</a></p>"
}
}
+ else{
+ $0="<p><a href='"$1"' rel=external target=_blank>"texto"</a></p>"
+ }
}
appendContenido( $0 )
}
Un proyecto texto-plano.xyz