(map)
| 112 | * @returns {string} replacement block (newline-terminated) |
| 113 | */ |
| 114 | const renderRegion = (map) => |
| 115 | `// #region html entities |
| 116 | // The contents of this region are auto-generated by |
| 117 | // \`tooling/generate-html-entities.js\` from \`tooling/html-entities.json\`. |
| 118 | // Do not edit by hand — re-run the generator (via \`yarn fix:special\`) to refresh. |
| 119 | // |
| 120 | // WHATWG named character references. Keys are entity names WITHOUT the |
| 121 | // leading \`&\` (some end with \`;\`, others omit it for legacy entities that |
| 122 | // match without a closing semicolon). Values are the decoded character |
| 123 | // strings (1–2 UTF-16 code units). |
| 124 | // Built on a null prototype so bracket lookups (\`HTML_ENTITIES[name]\`) |
| 125 | // can't be poisoned by inherited \`Object.prototype\` keys like \`toString\`, |
| 126 | // \`constructor\`, or \`__proto__\` — without this, \`&toString;\` would falsely |
| 127 | // look like a matched named character reference. |
| 128 | // prettier-ignore |
| 129 | // cspell:disable-next-line |
| 130 | const HTML_ENTITIES = /** @type {Readonly<Record<string, string>>} */ (Object.freeze(Object.assign(Object.create(null), ${JSON.stringify(map)}))); |
| 131 | // #endregion |
| 132 | `; |
| 133 | |
| 134 | (async () => { |
| 135 | if (doFetch) { |
no outgoing calls
no test coverage detected