This commit is contained in:
9
node_modules/stringify-entities/lib/util/to-decimal.js
generated
vendored
Normal file
9
node_modules/stringify-entities/lib/util/to-decimal.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
module.exports = toDecimalReference
|
||||
|
||||
var fromCharCode = require('../constant/from-char-code')
|
||||
|
||||
// Transform `code` into a decimal character reference.
|
||||
function toDecimalReference(code, next, omit) {
|
||||
var value = '&#' + String(code)
|
||||
return omit && next && !/\d/.test(fromCharCode(next)) ? value : value + ';'
|
||||
}
|
||||
Reference in New Issue
Block a user