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:
parent
3dd9abb8ad
commit
9cf1a39d85
14
boot/boot.js
14
boot/boot.js
@ -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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user