I ran into this with a tag i made the other day, I think its got something to do with white space in the tag, but i haven’t been able to replicate it enough to post an issue. Try stripping all the leading and trailing space inside your tag code. I think Kirby Text is treating the white space as <pre>.
All ive got is that it went away when i tidied the tag up by removing blank lines and leading / trailing space.
@texnixe The current thread is about the built in tags, but for me it happened with the code in this post, which also uses Html::figure.
I think because the snippet code has enough leading spaces on some lines to trigger markdown pre. It doesn’t happen with the final snippet at the end of the thread. I will post an issue if i can reliably replicate it again. I guess it could be a problem with Html::figure since thats the common element here.