Repository navigation
fix(questions): a Recommended: line names a markdown label by its plain words - #2251
Merged
Merged
Conversation
…in words - [ ] [Pagefind](x.html) with 'Recommended: Pagefind' named nothing (the raw label is the link), so the card showed no recommendation and the line became a suggested answer. After the exact matches, the label's plain words (link and wiki-link labels kept, images and tags out, emphasis and code marks dropped) name the one choice that has them; two such choices name none, as before.
…up patterns shared in core/inline-markdown - fallbackHit tries a part's plain words too, so 'Recommended: Pagefind and Algolia' names both link labels on :::question-multi. - stripInlineMarkup (packages/core/inline-markdown.ts, imports nothing): the image, link, wiki-link and tag patterns stop at the next opener, so a run of [, [[, ), [page](code:app/(shop)/[id]/page.tsx#L4) and .png) stayed raw markdown: the bounded destination stopped at the first (. It now takes one balanced pair and still stops at any other (, so runs of brackets stay linear (timing guards extended to ( runs).
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.
A
Recommended:line now names a choice whose label is written as markdown, such as a link:- [ ] [Pagefind](x.html)withRecommended: Pagefind. Before this, nothing was marked recommended, and the line showed as a suggested answer instead.packages/core/question-block.ts. It doesn't usecleanInline(packages/core/inbox-folding.ts) because that module imports question-block, so using it would create a circular import. Inbox: show a markdown choice label's words, not its markdown, in folded lines and answer rows #2219 (plainLabel) has not merged yet.Tests (
packages/core/question-block.recommended-plain.test.ts):(Recommended)marker;Typecheck is clean. The core, inbox and MCP tests pass (1,288 pass, 0 fail). The UI QuestionBlock DOM tests pass (107 pass, 0 fail).