From 88f810ea1d815a37dc57d380e8c8ebaaa16b9466 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Thu, 7 Mar 2024 18:37:25 +0100 Subject: [PATCH] improved syntax translation --- moinimport.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/moinimport.sh b/moinimport.sh index b747843..1815a83 100755 --- a/moinimport.sh +++ b/moinimport.sh @@ -26,11 +26,11 @@ reformat() { s;^----+$;\n&; - s;\{\{attachment:(.*)\|(.*)\|(.*)\}\};![\2](\1 "\3");g - s;\{\{attachment:(.*)\|(.*)\}\};![\2](\1);g - s;\{\{attachment:(.*)\}\};![](\1);g - s;\[\[(.*)\|(.*)\|(.*)\]\];[\2](\1);g - s;\[\[(.*)\|(.*)\]\];[\2](\1);g + s;\{\{attachment:([^}|]*)\|([^}|]*)\|([^}|]*)\}\};![\2](\1 "\3");g + s;\{\{attachment:([^}|]*)\|([^}|]*)\}\};![\2](\1);g + s;\{\{attachment:([^}|]*)\}\};![](\1);g + s;\[\[([^]|]*)\|([^]|]*)\|([^]|]*)\]\];[\2](\1);g + s;\[\[([^]|]*)\|([^]|]*)\]\];[\2](\1);g /\{\{\{+#!wiki/{ s;\{;:;g; @@ -40,7 +40,7 @@ reformat() { /^\}\}\}+$/s;\};:;g; :MACRO - s;<<([^\(>]+)\(([^,)]+)([^)]*)\)>>;<<\1 "\2"(\3)>>;g; + s;<<([^\(>]+)\(([^,)]+),?([^)]*)\)>>;<<\1 "\2"(\3)>>;g; tMACRO s;<<([^\(>]+)\(\)>>;<<\1>>;g; ' -- 2.39.2