Ubuntu 20.04, 0.99.23
If a closing bracket is at the end of the headline the table of content is not working correctly. It will add the anchor to the end of the next line and in the TOC the next line is also showed and breaks the overview (see screenshot, TOC and headline _test2(test)_). If a anchor already exists at a headline, it will not create a second anchor or uses the existing anchor, it links to anchor which could not be found (see screenshot, click on link _test2_ -> error message)

thanks will be on in 0.99.24
I think the linking error was not fixed. If an anchor already exists the toc will not work correctly. Maybe it is possible to check if an anchor already exists and if one exists take it to create a link to it or maybe to create a second anchor for the toc only.
As you can see in the screenshot, before creating the toc an anchor test_anchor already exists. Then the toc will not correctly link to the headline

thanks, will be ok in 0.99.25
Thank you for your new release and instantly fixing bugs :) I'm very sorry but I think the issue is not fully fixed. :/
Now the toc is created correctly with all links, but the already existing anchors get overwritten, so all manually set links are broken (see screenshot):

Isn't this possible?
So all old anchors should still be valid and the toc should also work with the already existing anchors ;)
Should I open a new issue?
I'll have a thought, I'm not sure about introducing support for other anchor names, I may just leave both
@giuspen: you mean you will create a new anchor for the toc and you'll not delete the manual created anchor? I think this would also be okay :)
should be ok in 0.99.26
Thank you, now everything works fine :)