We can't do to lower since it'll mess up the emoji parsing, instead we need to handle both cases properly
Need to handle upper and lower case tag names, this change also lets us make the tag handling more generic, but it may be slower with all these span look ups. I'll do some profiling and see if it's enough to care about.