-
I have this snippet:
But if the
But I would like to just ignore such output, but this (the additional
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
Actually, it seems that I have found a cure:
But why the |
Beta Was this translation helpful? Give feedback.
-
It would help to understand the actual use-case behind this. I'll also note that this is in already in the territory where doing things in Lua with proper program logic will be much easier to both write and read. |
Beta Was this translation helpful? Give feedback.
-
Yeah you'd want to write the whole macro in Lua, not just parts of it. And format like you would do regular code - just as a silly example:
I don't remember offhand whether RHEL9 supports empty lines in a macro definition like the above, but even if you have to replace it with a comment it'll be way more readable than the average one-line obfuscated perl contest the average complicated plain-macro macros tend to look like. Hrm, actually RHEL9 doesn't have the "Lua integration" stuff yet so arg[1] wont work there either. |
Beta Was this translation helpful? Give feedback.
-
Either way, Lua or not, I still find surprising that plain |
Beta Was this translation helpful? Give feedback.
-
I haven't had a chance to dig into that construct, it just looks so fishy that my recommendation is simply: don't bother, use lua. |
Beta Was this translation helpful? Give feedback.
-
You just need to escape the first % in the expand macro:
Without the expand:
As you can see, the expand macro does not get anything to expand if you do not escape the |
Beta Was this translation helpful? Give feedback.
You just need to escape the first % in the expand macro:
Without the expand:
As you can see, the expand macro does not get anything to expand if you do not escape the
%
.