From bd936e2b7d094ead5ff1b849670a20899de654ad Mon Sep 17 00:00:00 2001 From: Mario Pietsch Date: Thu, 18 Jul 2024 18:12:22 +0200 Subject: [PATCH 1/4] Update test-tags-operator.js (#8401) Forgot to activate the tests :/ --- editions/test/tiddlers/tests/test-tags-operator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editions/test/tiddlers/tests/test-tags-operator.js b/editions/test/tiddlers/tests/test-tags-operator.js index 002040613..87970d113 100644 --- a/editions/test/tiddlers/tests/test-tags-operator.js +++ b/editions/test/tiddlers/tests/test-tags-operator.js @@ -1,7 +1,7 @@ /*\ title: test-tags-operator.js type: application/javascript -tags: [[$:/tags/test-specX]] +tags: [[$:/tags/test-spec]] Tests the tagging mechanism. From b48be91ec5d27cd129366fd179bbe59cb8603bab Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Fri, 19 Jul 2024 08:51:48 +0100 Subject: [PATCH 2/4] Fix tiddlers should not be interactive after being closed (#8344) * Initial Commit * Revert "Initial Commit" This reverts commit 25edf0e2129195f9d8e59bbdd3ca5dc56d67f9a4. * Alternative fix --- core/modules/storyviews/classic.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/modules/storyviews/classic.js b/core/modules/storyviews/classic.js index c2848c435..044cd97f0 100644 --- a/core/modules/storyviews/classic.js +++ b/core/modules/storyviews/classic.js @@ -82,6 +82,10 @@ ClassicStoryView.prototype.remove = function(widget) { removeElement = function() { widget.removeChildDomNodes(); }; + // Blur the focus if it is within the descendents of the node we are removing + if($tw.utils.domContains(targetElement,targetElement.ownerDocument.activeElement)) { + targetElement.ownerDocument.activeElement.blur(); + } // Abandon if the list entry isn't a DOM element (it might be a text node) if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) { removeElement(); From bfb9c38c42fbaf97497d9fbffc276c4d6ff490b2 Mon Sep 17 00:00:00 2001 From: Leilei332 Date: Fri, 19 Jul 2024 15:52:57 +0800 Subject: [PATCH 3/4] Make markdown wikitext links readable (#8402) --- .../markdown/editor-operations/make-markdown-link.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/tiddlywiki/markdown/editor-operations/make-markdown-link.js b/plugins/tiddlywiki/markdown/editor-operations/make-markdown-link.js index b124325c8..76f62f5a5 100644 --- a/plugins/tiddlywiki/markdown/editor-operations/make-markdown-link.js +++ b/plugins/tiddlywiki/markdown/editor-operations/make-markdown-link.js @@ -13,15 +13,15 @@ Text editor operation to make a markdown link "use strict"; exports["make-markdown-link"] = function(event,operation) { - var rx = /[()\\]/g, rs = '\\$&'; + var rx = /[()<>\\]/g, rs = '\\$&'; if(operation.selection) { var desc = operation.selection.replace(/[\[\]\\]/g, rs); if(event.paramObject.text.indexOf("://") !== -1) { - operation.replacement = "[" + desc + "](" + event.paramObject.text.replace(rx, rs) + ")"; + operation.replacement = "[" + desc + "](" + event.paramObject.text.replace(/[()\\]/g, rs) + ")"; } else { - operation.replacement = "[" + desc + "](#" + encodeURIComponent(event.paramObject.text).replace(rx, rs) + ")"; + operation.replacement = "[" + desc + "](<#" + event.paramObject.text.replace(rx, rs) + ">)"; } operation.cutStart = operation.selStart; operation.cutEnd = operation.selEnd; @@ -31,7 +31,7 @@ exports["make-markdown-link"] = function(event,operation) { return encodeURI(m); }) + ">"; } else { - operation.replacement = "[](#" + encodeURIComponent(event.paramObject.text).replace(rx, rs) + ")"; + operation.replacement = "[](<#" + event.paramObject.text.replace(rx, rs) + ">)"; } operation.cutStart = operation.selStart; operation.cutEnd = operation.selEnd; From 3d2e6e4895a8c8120c989dd99e32d2925c29ca36 Mon Sep 17 00:00:00 2001 From: springerspandrel <66639553+springerspandrel@users.noreply.github.com> Date: Sat, 20 Jul 2024 17:37:23 -0400 Subject: [PATCH 4/4] Tweak empty-tag-node solution, to avoid interfering with technical plugins' use of tag-space (#8405) --- editions/tw5.com/tiddlers/empty-tag-node-template.tid | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/editions/tw5.com/tiddlers/empty-tag-node-template.tid b/editions/tw5.com/tiddlers/empty-tag-node-template.tid index a85a7f8d5..6827c6fe2 100644 --- a/editions/tw5.com/tiddlers/empty-tag-node-template.tid +++ b/editions/tw5.com/tiddlers/empty-tag-node-template.tid @@ -1,11 +1,11 @@ created: 20240710161501472 -list-after: $:/core/ui/ViewTemplate/body -modified: 20240713020832439 +list-after: +modified: 20240719201317702 tags: $:/tags/ViewTemplate title: $:/editions/tw5.com/empty-tag-node-template type: -<$list filter='[!has[text]] :filter[tagging[]]'> +<$list filter='[!has[text]!has[tags]] :filter[tagging[]]'> The following tiddlers are tagged with <>: -<!has[text]tagging[]]" class:"multi-columns">> \ No newline at end of file +<!has[text]!has[tags]tagging[]]" class:"multi-columns">> \ No newline at end of file