Fix case of hyphenated skooma elements
This commit is contained in:
parent
544e18f9b8
commit
62f974b878
1 changed files with 2 additions and 2 deletions
|
@ -24,9 +24,9 @@ const parseArgs = (element, args) => {
|
||||||
const node = (name, args, xmlns) => {
|
const node = (name, args, xmlns) => {
|
||||||
let element
|
let element
|
||||||
if (xmlns)
|
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
|
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)
|
parseArgs(element, args)
|
||||||
return element
|
return element
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue