I have read through half a dozen threads on this subject and have tried a bunch of different things to address it.
I'm putting my custom HTML together as plain text in Apple's Text Edit.
Then i'm pasting it into the editor field in the custom HTML field.
This was going fine for a while.
Now I can't get my code to stay as I wrote it. It is really simple code and had no issue at first. Every time I edit it or paste it in, Shopify's magic wizard behind the scenes garbles it all up and adds all this crap to my links, and it totally destroys my code.
I've gone deeper into the code of the page and can't find my code in any of the theme files that were suggested on threads.
All I'm trying to do is keep my code as I wrote it.
What do I do?
Although the many events of the code related realm do seem like witchcraft, there is (hopefully) always a plausible explanation for why things are happening.
What initially comes to my mind is the source of 99% of the root cause for bugs discussed in this forum: apps or custom coding, the latter in the case you hired a developer to modify your theme or you modified it yourself in any shape or form.
Some app you're using or external code could be overwriting the custom HTML code or injecting some CSS that conflicts with your custom HTML and subsequently hides it.
It's difficult to pinpoint without accessing your website and debugging it, but that'd be my blind guess.