diff options
| author | Hsieh Chin Fan <pham@topo.tw> | 2024-09-13 20:01:24 +0800 |
|---|---|---|
| committer | Hsieh Chin Fan <pham@topo.tw> | 2024-09-15 00:27:45 +0800 |
| commit | 071e07350c85a6376aa5bd3b900a59ebf6c304ee (patch) | |
| tree | 999dea13c86b3c1f3dced7c75f5b11ad997dfc8c | |
| parent | 7f3faf7dd4cbb1a42775b17ac4a7ed93749e0917 (diff) | |
style: Reformat code
| -rw-r--r-- | src/dumbymap.mjs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/dumbymap.mjs b/src/dumbymap.mjs index 46682c9..a34998f 100644 --- a/src/dumbymap.mjs +++ b/src/dumbymap.mjs | |||
| @@ -258,9 +258,11 @@ export const generateMaps = async (container) => { | |||
| 258 | const renderTargets = Array.from(container.querySelectorAll('pre:has(.language-map)')) | 258 | const renderTargets = Array.from(container.querySelectorAll('pre:has(.language-map)')) |
| 259 | const renderAllTargets = renderTargets.map(async (target) => { | 259 | const renderAllTargets = renderTargets.map(async (target) => { |
| 260 | // Get text in code block starts with '```map' | 260 | // Get text in code block starts with '```map' |
| 261 | // BE CAREFUL!!! 0xa0 char is "non-breaking spaces" in HTML text content | 261 | const configText = target.querySelector('.language-map') |
| 262 | // replace it by normal space | 262 | .textContent |
| 263 | const configText = target.querySelector('.language-map').textContent.replace(/\u00A0/g, '\u0020') | 263 | // BE CAREFUL!!! 0xa0 char is "non-breaking spaces" in HTML text content |
| 264 | // replace it by normal space | ||
| 265 | .replace(/\u00A0/g, '\u0020') | ||
| 264 | 266 | ||
| 265 | let configList = [] | 267 | let configList = [] |
| 266 | try { | 268 | try { |