From 071e07350c85a6376aa5bd3b900a59ebf6c304ee Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Fri, 13 Sep 2024 20:01:24 +0800 Subject: style: Reformat code --- src/dumbymap.mjs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') 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) => { const renderTargets = Array.from(container.querySelectorAll('pre:has(.language-map)')) const renderAllTargets = renderTargets.map(async (target) => { // Get text in code block starts with '```map' - // BE CAREFUL!!! 0xa0 char is "non-breaking spaces" in HTML text content - // replace it by normal space - const configText = target.querySelector('.language-map').textContent.replace(/\u00A0/g, '\u0020') + const configText = target.querySelector('.language-map') + .textContent + // BE CAREFUL!!! 0xa0 char is "non-breaking spaces" in HTML text content + // replace it by normal space + .replace(/\u00A0/g, '\u0020') let configList = [] try { -- cgit v1.2.3-70-g09d2