Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(line-numbers): support highlighted lines #266

Merged
merged 2 commits into from
Feb 13, 2023
Merged

Conversation

metonym
Copy link
Owner

@metonym metonym commented Feb 12, 2023

Closes #256

Supports highlighting specific lines through the highlightedLines prop. Customize the background color using --highlighted-background style prop.

<Highlight language={typescript} {code} let:highlighted>
  <LineNumbers {highlighted} highlightedLines={[1, 2]} --highlighted-background="#000" />
</Highlight>

Example

@render
Copy link

render bot commented Feb 12, 2023

@render
Copy link

render bot commented Feb 12, 2023

@metonym metonym merged commit 48c580d into master Feb 13, 2023
@metonym metonym deleted the highlighted-lines branch February 13, 2023 00:09
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.

Support highlighted lines using LineNumbers
1 participant