Skip to content

feat: add line anchors transformer for shiki#8

Merged
pheralb merged 2 commits into
pheralb:mainfrom
uvenkatateja:feat/add-line-anchors-transformer
Feb 11, 2026
Merged

feat: add line anchors transformer for shiki#8
pheralb merged 2 commits into
pheralb:mainfrom
uvenkatateja:feat/add-line-anchors-transformer

Conversation

@uvenkatateja

Copy link
Copy Markdown
Contributor

Adds a transformer to enable clickable anchor links on line numbers, similar to GitHub's line linking feature.

What's Added

  • line-anchors.ts transformer - Adds id attributes to each line (L1, L2, etc.)
  • Documentation page following existing patterns
  • CSS styles for targeted line highlighting
  • Registry entry for shadcn/ui CLI
  • Sidebar navigation entry

Usage

Works automatically with lineNumbers transformer. Users can link to specific lines using #L5 in URLs.

Why

Enables easy reference and sharing of specific code lines in documentation, similar to GitHub/GitLab.

@vercel

vercel Bot commented Feb 11, 2026

Copy link
Copy Markdown

@uvenkatateja is attempting to deploy a commit to the Pablo Hdez's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented Feb 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
code-blocks Ready Ready Preview, Comment Feb 11, 2026 6:18pm

@pheralb

pheralb commented Feb 11, 2026

Copy link
Copy Markdown
Owner

I like it! But I think we need to add an example of how to use it 👀

@pheralb

pheralb commented Feb 11, 2026

Copy link
Copy Markdown
Owner

Thanks 🚀

@pheralb pheralb merged commit 9d29fde into pheralb:main Feb 11, 2026
4 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