mirror of
https://github.com/stablyai/orca.git
synced 2026-11-04 11:07:42 +00:00
* fix(editor): preserve sibling tasks beneath ordered list items * fix(editor): preserve wrapped inline markup in task items * fix(editor): keep nested task continuations valid and editable * fix(editor): keep literal task markers out of mixed checklists * fix(editor): apply review fixes to task-list parsing stack - Trim synthetic test matrices to the behavioral cases - Regenerate pnpm-lock (drops a stale github-slugger importer entry) - Assert the plain bullet's node type under an ordered parent * fix(editor): keep one-column-deeper ordered tasks as sibling checkboxes Dedent an ordered item's task block by the first task's column instead of keeping its leading whitespace. A task one column deeper stays a sibling checkbox, and text at or within the first task's column stays nested as before. Strip leftover paragraph indent from task children. --------- Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
25 lines
810 B
Diff
25 lines
810 B
Diff
diff --git a/dist/index.cjs b/dist/index.cjs
|
|
--- a/dist/index.cjs
|
|
+++ b/dist/index.cjs
|
|
@@ -129,7 +129,7 @@
|
|
* ```
|
|
*/
|
|
function isTaskItem(item) {
|
|
- const match = (item.raw || item.text || "").match(/^(\s*)[-+*]\s+\[([ xX])\]\s+/);
|
|
+ const match = (item.raw || item.text || "").match(/^(\s*)[-+*]\s+\[([ xX])\][^\S\r\n]+/);
|
|
if (match) return {
|
|
isTask: true,
|
|
checked: match[2].toLowerCase() === "x",
|
|
diff --git a/dist/index.js b/dist/index.js
|
|
--- a/dist/index.js
|
|
+++ b/dist/index.js
|
|
@@ -128,7 +128,7 @@
|
|
* ```
|
|
*/
|
|
function isTaskItem(item) {
|
|
- const match = (item.raw || item.text || "").match(/^(\s*)[-+*]\s+\[([ xX])\]\s+/);
|
|
+ const match = (item.raw || item.text || "").match(/^(\s*)[-+*]\s+\[([ xX])\][^\S\r\n]+/);
|
|
if (match) return {
|
|
isTask: true,
|
|
checked: match[2].toLowerCase() === "x",
|