Closed
Description
Citations are recognized according to the following docstring
'^.. \\[([a-z0-9_.-])\\]'
Clearly, this only matches when there is a single char between the square brackets.
With this, the following logic
# start renaming from the longest string, to avoid overwriting parts
references.sort(key=lambda x: -len(x))
is never used. Furthermore, such sorting does not seem to be necessary anyway, since the citations
are replaced /including/ the square brackets:
lines[i] = lines[i].replace(sixu('[%s]_') % r,
sixu('[%s]_') % new_r)
which should be enough to assure that reference keys are never overwritten in parts.
Metadata
Metadata
Assignees
Labels
No labels