Fix case of hyphenated skooma elements

This commit is contained in:
Talia 2021-05-26 11:26:12 +02:00
parent 544e18f9b8
commit 62f974b878
No known key found for this signature in database
GPG key ID: AD727AD22802D0D6

View file

@ -24,9 +24,9 @@ const parseArgs = (element, args) => {
const node = (name, args, xmlns) => {
let element
if (xmlns)
element = document.createElementNS(xmlns, name.replace(/([a-z])([A-Z])/g, "$1-$2"))
element = document.createElementNS(xmlns, name.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase())
else
element = document.createElement(name.replace(/([a-z])([A-Z])/g, "$1-$2"))
element = document.createElement(name.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase())
parseArgs(element, args)
return element
}