aboutsummaryrefslogtreecommitdiff
path: root/data/pandoc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'data/pandoc.lua')
-rw-r--r--data/pandoc.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/data/pandoc.lua b/data/pandoc.lua
index 8a45a39e9..859ecedc4 100644
--- a/data/pandoc.lua
+++ b/data/pandoc.lua
@@ -846,7 +846,10 @@ local AttributeList = {
__newindex = function (t, k, v)
local cur, idx = List.find_if(t, assoc_key_equals(k))
- if v == nil then
+ if v == nil and not cur then
+ -- deleted key does not exists in list
+ return
+ elseif v == nil then
table.remove(t, idx)
elseif cur then
cur[2] = v