scrapbox-titleLc
2021-06-12 12:47:18 decodeURIComponent()を消した
decodeできない文字列を渡すとエラーを吐いてしまう
decodeしたいときは利用側でやる
decodeすべき文字列かどうかは利用側で判断できる
decodeはtitleLcを作る処理の責務ではない
code:script.js
export const toLc = text => text.toLowerCase()
.replaceAll(' ', '_')
.replace(//?#\{}^|<>/g, char => encodeURIComponent(char));