volleyball-dev-frontend/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js
2025-06-02 16:42:16 +00:00

12 lines
272 B
JavaScript

/**
* Encode a code point as a character reference.
*
* @param {number} code
* Code point to encode.
* @returns {string}
* Encoded character reference.
*/
export function encodeCharacterReference(code) {
return '&#x' + code.toString(16).toUpperCase() + ';'
}