Quote:
Originally Posted by lomkiri
Code:
def replace(match, number, file_name, metadata, dictionaries, data, functions, *args, **kwargs):
i = match.group(2)
if i:
return match.group(1) + str(int(i) +1) + match.group(3)
return match.group(0)
|
@lomkiri Thanks for posting this solution to @Karellen's problem.
I needed to sync some endnotes with their refs. In the manual I found a template language function called BuiltinAdd, but am not skilled enough to make use of it. Then I came across your solution and it worked for me.