s;^----+$;\n&;
- s;\{\{attachment:(.*)\|(.*)\|(.*)\}\};;g
- s;\{\{attachment:(.*)\|(.*)\}\};;g
- s;\{\{attachment:(.*)\}\};;g
- s;\[\[(.*)\|(.*)\|(.*)\]\];[\2](\1);g
- s;\[\[(.*)\|(.*)\]\];[\2](\1);g
+ s;\{\{attachment:([^}|]*)\|([^}|]*)\|([^}|]*)\}\};;g
+ s;\{\{attachment:([^}|]*)\|([^}|]*)\}\};;g
+ s;\{\{attachment:([^}|]*)\}\};;g
+ s;\[\[([^]|]*)\|([^]|]*)\|([^]|]*)\]\];[\2](\1);g
+ s;\[\[([^]|]*)\|([^]|]*)\]\];[\2](\1);g
/\{\{\{+#!wiki/{
s;\{;:;g;
/^\}\}\}+$/s;\};:;g;
:MACRO
- s;<<([^\(>]+)\(([^,)]+)([^)]*)\)>>;<<\1 "\2"(\3)>>;g;
+ s;<<([^\(>]+)\(([^,)]+),?([^)]*)\)>>;<<\1 "\2"(\3)>>;g;
tMACRO
s;<<([^\(>]+)\(\)>>;<<\1>>;g;
'