mirror of
https://github.com/falcosecurity/falco.git
synced 2026-05-12 17:52:56 +00:00
Remove trailing newlines from output
If in yaml, the output field is folded-style aka: output: < some multi-line output here The unfolded string will have a trailing newline. Remove it.
This commit is contained in:
@@ -127,6 +127,7 @@ function trim(s)
|
||||
if (type(s) ~= "string") then return s end
|
||||
return (s:gsub("^%s*(.-)%s*$", "%1"))
|
||||
end
|
||||
parser.trim = trim
|
||||
|
||||
local function terminal (tag)
|
||||
-- Rather than trim the whitespace in this way, it would be nicer to exclude it from the capture...
|
||||
|
||||
Reference in New Issue
Block a user