Keep a link list whose title holds a bracketed word - #113
Merged
Merged
Conversation
drizzle's llms.txt names a page `- [Joins [SQL]](.../pg/joins)`. The link list pattern read the title up to its first `]`, so that line did not match, and a paragraph with any line that is not a link stays verbatim: the section around it lost every link. On the live file that is 82 of its 454 entries, in the seven sections that list a Joins page. The title may now hold one level of bracketed text, which Markdown allows when the brackets pair up. A title whose brackets do not pair still does not match, so such a paragraph stays verbatim as before. Co-Authored-By: Claude Opus 5.5 <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.
oc open https://orm.drizzle.team/llms.txtgives no followable link in seven of drizzle's sections. Each of them lists a page titled[Joins [SQL]]:LINK_ITEMread the title up to its first], so the Joins line did not match. A paragraph with any line that is not a link stays verbatim by design, so the whole section fell back to text. On the live file that is 82 of 454 entries.Links found in the paragraph above:
The title may now hold one level of bracketed text, which Markdown allows when the brackets pair up. A title with brackets that do not pair still does not match, so that paragraph stays verbatim as before. The two alternatives in the pattern start on different characters, so it stays linear.
Test.
tests/text.test.jsgains one test: the three-line section above yields all three links, and- [a ] b](...)still yields none. Onmainit fails on the firstdeepEqual(no links). Full suite: 311 tests, 308 pass, 3 skipped, 0 fail.Measured on live llms.txt files (entries lost to verbatim paragraphs, main / branch): drizzle 82 / 0. Bun, Cloudflare, Anthropic, uv, Stripe, Hono, Supabase, Svelte, Vercel, and Zod lose none either way.
Left alone. Expo's llms.txt loses 282 of 558 entries for a different reason: each heading sits on the line right above its list, with no blank line between. That is a separate change to how a paragraph is split, so it is not in this PR.
🤖 Generated with Claude Code