I had the same issue like @Kate.
In my case the indentation force the problem with a pre
& code
-tag around my snippet-code if I call the snippet from a kirbytag.
Form my point of view this issue is related to my issue: Snippet in kirbytag output unnecessary p-tag