Skip to content

Commit

Permalink
chore(nuxt): remove unused code (#26319)
Browse files Browse the repository at this point in the history
  • Loading branch information
huang-julien committed Mar 17, 2024
1 parent 523db1a commit 03f7b09
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions packages/nuxt/src/app/components/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,24 +75,6 @@ export function createBuffer () {
}
}

const TRANSLATE_RE = /&(nbsp|amp|quot|lt|gt);/g
const NUMSTR_RE = /&#(\d+);/gi
export function decodeHtmlEntities (html: string) {
const translateDict = {
nbsp: ' ',
amp: '&',
quot: '"',
lt: '<',
gt: '>'
} as const
return html.replace(TRANSLATE_RE, function (_, entity: keyof typeof translateDict) {
return translateDict[entity]
}).replace(NUMSTR_RE, function (_, numStr: string) {
const num = parseInt(numStr, 10)
return String.fromCharCode(num)
})
}

/**
* helper for NuxtIsland to generate a correct array for scoped data
*/
Expand Down

0 comments on commit 03f7b09

Please sign in to comment.