From 9cf1a39d851986fcfd1dcfebcb42288352fb4c44 Mon Sep 17 00:00:00 2001 From: Scott Sauyet Date: Sat, 9 Sep 2023 20:31:01 -0400 Subject: [PATCH] Remove commented sample code --- boot/boot.js | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/boot/boot.js b/boot/boot.js index 803601b0f..05018d6cc 100644 --- a/boot/boot.js +++ b/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 */