From: Paul Hänsch Date: Sun, 26 Jun 2022 19:47:14 +0000 (+0200) Subject: reset record separator after macro execution X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=7716b0023692c79ec9e923b4295b115dc995392e;p=shellwiki reset record separator after macro execution --- diff --git a/md_macros.awk b/md_macros.awk index 4b85a0e..88e662f 100755 --- a/md_macros.awk +++ b/md_macros.awk @@ -48,8 +48,10 @@ function macro(call, LOCAL, line, args) { for (n = 1; n in args; n++) call = call sh_escape(args[n]) " "; if (args[1] in MACROS) { + oldRS=RS; oldORS=ORS; RS=""; ORS=""; line=""; "printf '%s' " sh_escape(file) " | " sh_escape(ENVIRON["MD_MACROS"]) "/" call | getline line; + RS=oldRS; ORS=oldORS; return line; } else { return HTML("<<" call ">>");