@skitterbyte/skitterspec-linear 10.1.0 → 10.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,15 +16,23 @@ const DEFAULT_WIDTH = 80
16
16
 
17
17
  // Start of a task bullet. The continuation lines that follow are any indented,
18
18
  // non-empty lines that are not themselves a bullet or heading.
19
- const TASK_START_RE = /^([ \t]*)-\s*\[([ xX])\]\s*(.*)$/
19
+ //
20
+ // The mark is ANY single character, not just ` `/`x`. Projects use `[~]` for
21
+ // in-progress, `[>]` for deferred, `[-]` for dropped, and a parser that only
22
+ // knew ` xX` matched none of them — so the whole bullet was claimed by no block
23
+ // and vanished from the mirror (bug-phase-content-dropped). What the mark MEANS
24
+ // is nobody's business here; it is carried through verbatim and re-emitted as
25
+ // written. Only `x`/`X` counts as done (see `parseTaskLine`).
26
+ const TASK_START_RE = /^([ \t]*)-\s*\[([^\]])\]\s*(.*)$/
20
27
  const CONTINUATION_RE = /^[ \t]+\S/
21
28
  const BLOCK_BREAK_RE = /^[ \t]*(?:[-*+]\s|\d+\.\s|#{1,6}\s|>|\||```)/
22
29
  // A list-marker line (unordered or ordered). Distinguished from other block
23
30
  // breaks because a wrapped continuation can legitimately begin with one.
24
31
  const LIST_MARKER_RE = /^[ \t]*(?:[-*+]|\d+\.)\s/
25
32
  // A checkbox bullet — unambiguously a task, so it always starts its own block,
26
- // at any indent. (A bare list marker is ambiguous; a checkbox never is.)
27
- const CHECKBOX_RE = /^[ \t]*[-*+]\s*\[[ xX]\]/
33
+ // at any indent. (A bare list marker is ambiguous; a checkbox never is.) Any
34
+ // mark, matching TASK_START_RE.
35
+ const CHECKBOX_RE = /^[ \t]*[-*+]\s*\[[^\]]\]/
28
36
  // A bare list bullet — no checkbox — captured with its marker so a sub-bullet
29
37
  // is re-rendered as the `-`/`*`/`1.` its author wrote.
30
38
  const BULLET_RE = /^([ \t]*)([-*+]|\d+\.)\s+(.*)$/
@@ -181,7 +189,9 @@ function findTaskBlocks(lines) {
181
189
  indent: t[1],
182
190
  marker: '-',
183
191
  checkbox: true,
184
- mark: t[2].toLowerCase() === 'x' ? 'x' : ' ',
192
+ // Case-folded for `x` (the one mark whose meaning we act on), otherwise
193
+ // verbatim — a project's `~`/`>`/`-` must round-trip as written.
194
+ mark: t[2].toLowerCase() === 'x' ? 'x' : t[2],
185
195
  text: collapseHyphenAware(parts.join('\n')),
186
196
  })
187
197
  open.push(indent)
@@ -189,9 +199,10 @@ function findTaskBlocks(lines) {
189
199
  continue
190
200
  }
191
201
 
192
- // A bare bullet is claimed ONLY inside an open task's subtree. Outside one
193
- // it is ordinary prose in the phase file: the projection is the task list,
194
- // not the whole body, and widening it here would mirror a Notes section.
202
+ // A bare bullet is claimed ONLY inside an open task's subtree there it is
203
+ // part of the task and must be re-rendered with it. Outside one it is
204
+ // ordinary prose, which the projection now passes through verbatim, so
205
+ // claiming it here would only re-wrap a list nobody asked us to touch.
195
206
  if (!open.length) continue
196
207
  const b = BULLET_RE.exec(line)
197
208
  if (!b) continue