Skip to content

Keep a link list whose title holds a bracketed word - #113

Merged
only-cli merged 1 commit into
only-cli:mainfrom
kevin9327:fix/link-list-bracketed-title
Sep 28, 2026
Merged

only-cli merged 1 commit into
only-cli:mainfrom
kevin9327:fix/link-list-bracketed-title

Conversation

@kevin9327

Copy link
Copy Markdown
Contributor

oc open https://orm.drizzle.team/llms.txt gives no followable link in seven of drizzle's sections. Each of them lists a page titled [Joins [SQL]]:

- [Select](https://orm.drizzle.team/docs/pg/select): Select rows.
- [Joins [SQL]](https://orm.drizzle.team/docs/pg/joins): Join tables.
- [Insert](https://orm.drizzle.team/docs/pg/insert)

LINK_ITEM read 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:

main:   links: []
branch: links: [ 'Select', 'Joins [SQL]', 'Insert' ]

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.js gains one test: the three-line section above yields all three links, and - [a ] b](...) still yields none. On main it fails on the first deepEqual (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

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>
@only-cli
only-cli merged commit 8aabfe5 into only-cli:main Sep 28, 2026
5 checks passed
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.

2 participants