remove {} from links
This commit is contained in:
parent
e514edf6ec
commit
0666e50f3c
19
gmo2gmi.awk
19
gmo2gmi.awk
|
@ -14,10 +14,8 @@ function nombre2Link( t, r ){ # convierte un nombre con espacios, a uno con r (e
|
|||
|
||||
}
|
||||
|
||||
# imprime líneas normamlmente
|
||||
|
||||
{
|
||||
print $0
|
||||
/^=>/{ # link
|
||||
gsub(/[{}]/,"")
|
||||
}
|
||||
|
||||
# si tienen sintaxis de wikilink, y no son líneas de enlace, agrega el link
|
||||
|
@ -28,9 +26,18 @@ function nombre2Link( t, r ){ # convierte un nombre con espacios, a uno con r (e
|
|||
|
||||
link = substr($0, i, ifinal-i+1) # {link}
|
||||
nombre = substr($0, i+1, ifinal-i-1) # link
|
||||
nombre = nombre2Link( nombre, "_" )
|
||||
filename = nombre2Link( nombre, "_" )
|
||||
|
||||
print "=> ./" nombre ".gmi " link
|
||||
gsub(/[{}]/,"")
|
||||
print $0
|
||||
print "=> ./" filename ".gmi " nombre
|
||||
next
|
||||
}
|
||||
|
||||
# imprime líneas normamlmente
|
||||
|
||||
{
|
||||
print $0
|
||||
}
|
||||
|
||||
# agrega footer
|
||||
|
|
Loading…
Reference in New Issue