From e6d54f976e313e149e5f3688d4db3c23cfb5adf5 Mon Sep 17 00:00:00 2001 From: sejo Date: Thu, 20 May 2021 16:06:33 -0500 Subject: =?UTF-8?q?&=20para=20incluir=20l=C3=ADneas=20gemtext?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gem2gem.awk | 7 +++++++ gemtext2html.awk | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/gem2gem.awk b/gem2gem.awk index 185d3e1..0f353c6 100644 --- a/gem2gem.awk +++ b/gem2gem.awk @@ -3,6 +3,13 @@ next # salta la línea } +/^& /{ # literal gemtext + sub(/^& /,"",$0) + print $0 + next + +} + # imprime líneas normamlmente { diff --git a/gemtext2html.awk b/gemtext2html.awk index c7e5fdc..0fa9326 100644 --- a/gemtext2html.awk +++ b/gemtext2html.awk @@ -83,11 +83,15 @@ NR == 1{ /^\+/{ # include literal - sub("^+","",$0) # elimina el + + sub(/^+ /,"",$0) # elimina el + appendContenido( $0 ) next } +/^&/{ # include literal gemtext + next +} + /^[[:blank:]]*$/ { # línea vacía if( !modo_pre ) { if( modo_lista ){ # cierra la lista -- cgit v1.2.3