From aec092e10966cd39fb75dadb00f713935b1f57a5 Mon Sep 17 00:00:00 2001 From: saqimtiaz Date: Fri, 9 Aug 2024 15:50:08 +0200 Subject: [PATCH] fix: tweak regexp to simplify code and document escaping rules --- core/ui/EditorToolbar/file-import.tid | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/ui/EditorToolbar/file-import.tid b/core/ui/EditorToolbar/file-import.tid index 571078e963d..0fd5e08a512 100644 --- a/core/ui/EditorToolbar/file-import.tid +++ b/core/ui/EditorToolbar/file-import.tid @@ -11,8 +11,8 @@ condition: [filter{$:/config/Editor/EnableImportFilter}] \procedure tw5-ImageTemplate() [img[$(currentTiddler)$]] \procedure tw5-FileTemplate() [[$(currentTiddler)$]] -\procedure escape-regexp() [()<>\\] -\function escape.title() [search-replace:g:regexp,[\$&]] + +\function escape.title() [search-replace:g:regexp[\(|\)|<|>|\\],[\$&]] \procedure markdown-ImageTemplate() ![](<#${ [escape.title[]] }$>) \procedure markdown-FileTemplate() [](<#${ [escape.title[]] }$>)