Thanks for the response! I forgot to check the notify option, so I didn’t realize this thread had a reply.
I found a workaround for my HTML format: uncheck “Convert document links to HTML links” in compile Options (under the gear icon). I do have a TOC that links to each chapter, but the HTML version of my e-book doesn’t really need this feature, so it’s OK to uncheck this box.
Unfortunately this workaround does not work for my EPUB format, presumably because the compiler still needs to create anchor points for the EPUB’s built-in TOC.
The problem does seem to occur when the font being used at an anchor point does not happen to include curly braces in its character set. Would it be possible to change the temporary markup Scrivener creates for this particular feature to use a more common character, like a colon?
I’ve looked into this and it actually has nothing to do with fonts (which don’t affect the underlying text). The problem is that your RegEx replacements are interfering with the internal tags that Scrivener uses for anchors during the Compile progress, mangling them so that they are no longer recognised at the other end of the process. I’ve fixed this for the next update, but in the meantime you can work around it if it’s possible to tweak your RegEx replacements.