Anchors for code blocks?

Hi folks!

I was wondering if it’s possible to set an anchor within the theme for code blocks. Even if I put an anchor tag in the code block, Upfront doesn’t seem to recognize it as a linkable anchor when defining a link in (for example) the header nav. The normal way of doing it isn’t available, as the little green config icon doesn’t appear for code blocks. Any solution?