aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/dumbymap.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'src/dumbymap.mjs')
-rw-r--r--src/dumbymap.mjs8
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 {