fix: cancel date goes before task content

This commit is contained in:
haron-IV 2025-09-25 10:59:24 +02:00 committed by Quorafind
parent 9109c07d28
commit 8b48e6a25b

View file

@ -672,7 +672,9 @@ function findMetadataInsertPosition(
const blockRef = detectBlockReference(lineText);
// Find the end of the task content, right after the task description
const taskMatch = lineText.match(/^[\s|\t]*([-*+]|\d+\.)\s\[.\]\s*/);
const taskMatch = lineText.match(
/^[\s|\t]*([-*+]|\d+\.)\s\[(.)\]\s*([^#\[📅🚀✅❌🛫▶️⏰🏁]*)/
);
if (!taskMatch) return blockRef ? blockRef.index : lineText.length;
let position = taskMatch[0].length;