Skip to content

Commit

Permalink
implement fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ryancasburn-KAI committed Jan 5, 2024
1 parent b5069c9 commit a84129d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/1-one/output/api/html.js
@@ -1,12 +1,12 @@
const isClass = /^\../
const isId = /^#./

const escapeXml = (str) => {
const escapeXml = str => {
str = str.replace(/&/g, '&')
str = str.replace(/</g, '&lt;')
str = str.replace(/>/g, '&gt;')
str = str.replace(/"/g, '&quot;')
str = str.replace(/'/g, '&apos;');
str = str.replace(/'/g, '&apos;')
return str
}

Expand Down Expand Up @@ -64,7 +64,8 @@ const html = function (obj) {
if (starts.hasOwnProperty(t.id)) {
out += starts[t.id].join('')
}
out += t.pre || '' + t.text || ''
out += t.pre || ''
out += t.text || ''
if (ends.hasOwnProperty(t.id)) {
out += ends[t.id].join('')
}
Expand All @@ -73,4 +74,4 @@ const html = function (obj) {
})
return out
}
export default { html }
export default { html }

0 comments on commit a84129d

Please sign in to comment.