Avoid doubled labels.
The null identifier for spans is the empty string, not nil.
This commit is contained in:
@ -216,11 +216,11 @@ local function control_label_placement(span)
|
||||
local id = span.identifier
|
||||
if label_placement == 'end' then
|
||||
span.content:insert(pandoc.Span({}, { id = id }))
|
||||
span.identifier = nil
|
||||
span.identifier = ''
|
||||
elseif label_placement == 'both' then
|
||||
span.content:insert(1, pandoc.Span({}, { id = id .. '-beg' })) -- for DOCX/ODT
|
||||
span.content:insert(pandoc.Span({}, { id = id .. '-end' }))
|
||||
span.identifier = nil
|
||||
span.identifier = ''
|
||||
elseif label_placement ~= 'beg' then
|
||||
warning('Invalid value ' .. label_placement .. ' on attribute ' .. PLACE_LABEL_ATTR .. ': ' ..
|
||||
'shoud be “beg” (default), “end” of “both”. Using the defaults.')
|
||||
|
||||
Reference in New Issue
Block a user