task-context: keep Related links well-formed when a title contains brackets#7
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A typed link whose target title contains
](e.g. a task titledSpec [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
## Relatedfeature on a live TickTick task.Fix
[/]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.\[(.*)\]\((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
].