Currently the HTML tag insertable regex in MediaWiki insertable has: /<\/?[a-z]+>/. This matches the tags only if they don't have an HTML attribute and highlight the starting tag and ending tags separately.
We can discuss and use an improve version that overcomes these limitations,
Possible regex: /(?<open><([a-z][a-z0-9]*)\b[^>]*>).*?(?<close><\/\2>)/