diff --git a/functional-programming-lean/custom.js b/functional-programming-lean/custom.js index 2f5ff10..80f4100 100644 --- a/functional-programming-lean/custom.js +++ b/functional-programming-lean/custom.js @@ -1,5 +1,5 @@ -const newline = /(?<=[,。、:」)])\n(?!\n)/g; -const space = /\s+(<.+?>\p{Script=Han}.+?<\/.+?>)\s+/g +const newline = /(?<=[,。、:;」)])\n(?!\n)/gu; +const space = /\s*(<.+?>\p{Script=Han}.+?<\/.+?>)\s*/gu; const paras = document.querySelectorAll("#content > main > p"); for (const p of paras) { p.innerHTML = p.innerHTML.replace(newline, "");