util.interpolation: Fix combination of filters and fallback values #1623

This commit is contained in:
Kim Alvefur 2021-01-25 20:58:11 +01:00
parent 0303e09dbb
commit 206be83885

View file

@ -43,11 +43,11 @@ local function new_render(pat, escape, funcs)
end
end
if funcs then
while value ~= nil and opt == '|' do
while opt == '|' do
local f;
f, raw, opt, e = s_match(block, "^([%a_][%w_.]*)(!?)(%p?)()", e);
f = funcs[f];
if f then value = f(value); end
if value ~= nil and f then value = f(value); end
end
end
if opt == '#' or opt == '%' then