1
0
Fork 0
mirror of https://github.com/Reuh/anselme.git synced 2025-10-27 16:49:31 +00:00

Fix default tags

This commit is contained in:
Étienne Fildadut 2022-01-14 21:31:56 +01:00
parent 10af596a58
commit 4214fafc68
2 changed files with 11 additions and 3 deletions

View file

@ -9,9 +9,15 @@ local function post_process_text(state, text)
local r = {}
-- copy into r & convert tags to lua
for _, t in ipairs(text) do
local tags = common.to_lua(t.tags)
if state.interpreter.base_lua_tags then
for k, v in pairs(state.interpreter.base_lua_tags) do
if tags[k] == nil then tags[k] = v end
end
end
table.insert(r, {
text = t.text,
tags = common.to_lua(t.tags)
tags = tags
})
end
-- remove trailing spaces