Skip to content

fix(repl-sdk): make {#custom-id} heading suffix actually set the id - #2219

Merged
NullVoxPopuli merged 2 commits into
mainfrom
fix-custom-heading-id
Aug 15, 2026
Merged

NullVoxPopuli merged 2 commits into
mainfrom
fix-custom-heading-id

Conversation

@NullVoxPopuli-ai-agent

Copy link
Copy Markdown
Collaborator

{#custom-id} now works as documented: the suffix becomes the heading id and is stripped from the rendered text.

Before, the suffix only suppressed the auto id. Nothing assigned the custom one, and the literal {#custom-id} stayed visible in the heading, even though kolay documents the feature as "To choose the id yourself, add {#custom-id} at the end of the heading".

## A very long heading {#short-id}

before: <h2>A very long heading {#short-id}</h2> (no id at all)
after: <h2 id="short-id">A very long heading</h2>

Independent of #2216 and survives its rework: this branch of headingId is the one piece that stays custom once auto ids move to rehype-slug, since rehype-slug skips headings that already carry an id.

Tests: 2 added in parse.test.ts (plain suffix; suffix after inline code). 60/60 across repl-sdk.

🤖 Generated with Claude Code

Previously the suffix only suppressed the auto-generated id: the custom
id was never assigned and the literal {#custom-id} stayed in the
rendered heading text, despite kolay documenting the feature as working.

Now the suffix becomes the heading id and is stripped from the text.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@NullVoxPopuli NullVoxPopuli added the bug Something isn't working label Aug 15, 2026
@NullVoxPopuli
NullVoxPopuli merged commit a66058a into main Aug 15, 2026
12 of 13 checks passed
@NullVoxPopuli
NullVoxPopuli deleted the fix-custom-heading-id branch August 15, 2026 22:10
@github-actions

Copy link
Copy Markdown
Contributor
Project Preview URL1 Manage
Limber https://fix-custom-heading-id.limber-glimdown.pages.dev on Cloudflare
Tutorial https://fix-custom-heading-id.limber-glimmer-tutorial.pages.dev on Cloudflare

Logs

Footnotes

  1. if these branch preview links are not working, please check the logs for the commit-based preview link. There is a character limit of 28 for the branch subdomain, as well as some other heuristics, described here for the sake of implementation ease in deploy-preview.yml, that algo has been omitted. The URLs are logged in the wrangler output, but it's hard to get outputs from a matrix job. ↩

NullVoxPopuli-ai-agent added a commit to gitKrystan/limber that referenced this pull request Aug 15, 2026
Test-file conflict resolved by keeping the branch's headingId block and
taking main's two {#custom-id} tests in place of the 'leaves alone'
test, which asserted the pre-NullVoxPopuli#2219 skip behavior.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions github-actions Bot mentioned this pull request Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants