`CodeBlock` - Expose ability to set custom line number start
:pushpin: Summary
If merged, this PR will add the ability to set a custom line numbering starting number to the CodeBlock component.
- Showcase preview: https://hds-showcase-git-code-block-add-line-number-st-0fda5f-hashicorp.vercel.app/components/code-block#content
- API docs preview: https://hds-website-git-code-block-add-line-number-sta-677e12-hashicorp.vercel.app/components/code-block?tab=code#codeblock
:link: External links
👀 Component checklist
- [x] Percy was checked for any visual regression
- [x] A changelog entry was added via Changesets if needed (see templates here)
:speech_balloon: Please consider using conventional comments when reviewing this PR.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated (UTC) |
|---|---|---|---|
| hds-showcase | ✅ Ready (Inspect) | Visit Preview | Oct 1, 2024 8:50pm |
| hds-website | ✅ Ready (Inspect) | Visit Preview | Oct 1, 2024 8:50pm |
I was unable to figure out a way to test the custom line numbers as they are added in CSS and not in the DOM.
@alex-ju Would it be ok if I go ahead and merge this feature? I think it's a generally useful feature for consumers.
Nice! Great work on this
@alex-ju Would it be ok if I go ahead and merge this feature? I think it's a generally useful feature for consumers.
I'm ok with merging it. We can monitor its usage in the long run.