diff options
-rw-r--r-- | gemtext2html.awk | 5 |
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 ) } |