I have ended up applying split to the string, then applying replaceRE and safeHTML to the different list elements, this way I can keep the Goldmark safe. I’m building a Hugo CMS for my users, as I couldn’t find one I was happy with, and it has to be baby proof.