1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-26 19:47:20 +00:00

Remove commented sample code

This commit is contained in:
Scott Sauyet 2023-09-09 20:31:01 -04:00
parent 3dd9abb8ad
commit 9cf1a39d85

View File

@ -323,20 +323,6 @@ $tw.utils.encodeTWURIComponent = function(s) {
.join('&')
};
/*
const encode = (input) => {
const sub = (s) => s.replace(/\[\[|\]\]/g, '')
const url = new URL(input)
const fragment = url.hash && decodeURIComponent(url.hash.slice(1))
if (fragment) {
const [focus, list = ''] = fragment.split(':')
const parts = list.split(/\[\[|\]\]\s?/).filter(Boolean).map(s=>s.trim()).map((s) => s.includes(' ') ? `[[${s}]]` : s).filter(Boolean)
const encoded = sub(focus) + (parts.length ? (':' + parts.map(sub).join('&')) : '')
url.hash = encoded
}
return url.toString().replaceAll('%20', ' ')
}
*/
/*
Convert a URI encoded string to a string safely
*/