🎉 initiate project *astro_rewrite*
This commit is contained in:
parent
ffd4d5e86c
commit
2ba37bfbe3
8658 changed files with 2268794 additions and 2538 deletions
14
node_modules/stringify-entities/lib/util/to-decimal.js
generated
vendored
Normal file
14
node_modules/stringify-entities/lib/util/to-decimal.js
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Configurable ways to encode characters as decimal references.
|
||||
*
|
||||
* @param {number} code
|
||||
* @param {number} next
|
||||
* @param {boolean|undefined} omit
|
||||
* @returns {string}
|
||||
*/
|
||||
export function toDecimal(code, next, omit) {
|
||||
const value = '&#' + String(code)
|
||||
return omit && next && !/\d/.test(String.fromCharCode(next))
|
||||
? value
|
||||
: value + ';'
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue