(entities)
| 92 | * @returns {Record<string, string>} name -> decoded characters |
| 93 | */ |
| 94 | const buildMap = (entities) => { |
| 95 | /** @type {Record<string, string>} */ |
| 96 | const map = {}; |
| 97 | // Sort alphabetically so the emitted literal is deterministic. |
| 98 | for (const k of Object.keys(entities).sort()) { |
| 99 | map[k.slice(1)] = entities[k].characters; |
| 100 | } |
| 101 | return map; |
| 102 | }; |
| 103 | |
| 104 | /** |
| 105 | * Render the `// #region html entities` … `// #endregion` block. The entity |
no test coverage detected