Fix case of hyphenated skooma elements

This commit is contained in:
Talia 2021-05-26 11:26:12 +02:00
parent f0b56c074c
commit 9e475b4924
Signed by: darkwiiplayer
GPG key ID: 7808674088232B3E

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
}