fix: importer bugs and editor bugs

This commit is contained in:
2026-02-14 21:24:01 +01:00
parent b036cf3c46
commit 4b31d9d421
9 changed files with 281 additions and 24 deletions

View File

@@ -637,6 +637,10 @@ export class ImportExecutionEngine extends EventEmitter {
// Unescape double-bracket macros that TurndownService escaped
// \[\[ becomes [[ and \]\] becomes ]]
markdown = markdown.replace(/\\\[\\\[/g, '[[').replace(/\\\]\\\]/g, ']]');
// Remove backslash escapes inside [[macro]] blocks (e.g. photo\_archive → photo_archive)
markdown = markdown.replace(/\[\[([^\]]*?)\]\]/g, (_match, inner: string) => {
return '[[' + inner.replace(/\\(.)/g, '$1') + ']]';
});
return markdown;
}