Skip to content

task-context: keep Related links well-formed when a title contains brackets#7

Merged
renezander030 merged 1 commit into
mainfrom
fix/related-bracket-titles
Jun 17, 2026
Merged

task-context: keep Related links well-formed when a title contains brackets#7
renezander030 merged 1 commit into
mainfrom
fix/related-bracket-titles

Conversation

@renezander030

Copy link
Copy Markdown
Owner

What

A typed link whose target title contains ] (e.g. a task titled Spec [draft]) rendered as [Spec [draft]](url) — nested brackets that break the markdown link and the round-trip parse, silently dropping the link from the typed-link model.

Caught while verifying the 0.7.0 ## Related feature on a live TickTick task.

Fix

  • Render: soften [/] in the display label to (/), keeping the markdown link well-formed and clickable. The URL carries the canonical id, so the label can be lossy.
  • Parse: make the title capture greedy (\[(.*)\]\((url)\)) so any stray bracket still round-trips, and links already written in the broken form recover.

Tests

Full suite 181/181, lint clean. New test: a bracketed title renders softened and round-trips; greedy parse recovers a label with a stray ].

…ackets

A link whose target title contained `]` (e.g. "Spec [draft]") rendered as
`[Spec [draft]](url)` — nested brackets that broke both the markdown link and
the round-trip parse, silently dropping the link. Soften `[`/`]` in the display
label to parens on render, and make the parser's title capture greedy so any
stray bracket still round-trips (and links already written that way recover).

Caught while verifying the 0.7.0 Related-section feature on a live task.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@renezander030 renezander030 merged commit ef3f8a5 into main Jun 17, 2026
2 checks passed
@renezander030 renezander030 deleted the fix/related-bracket-titles branch June 17, 2026 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant