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

Add rehype-highlight-code-lines to list of plugins #172

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

talatkuyuk
Copy link
Contributor

@talatkuyuk talatkuyuk commented Jun 21, 2024

Initial checklist

  • I read the support docs
  • I read the contributing guide
  • I agree to follow the code of conduct
  • I searched issues and couldn’t find anything (or linked relevant results below)
  • If applicable, I’ve added docs and tests

Description of changes

Added a new plugin rehype-highlight-code-lines to list of plugins

https://github.com/ipikuka/rehype-highlight-code-lines
https://www.npmjs.com/package/rehype-highlight-code-lines

It is rehype plugin to add container to each code line in a code block, allowing numbering of the code block and highlighting desired lines of code.

The rehype-highlight-code-lines works with rehype-highlight well; and should be used after rehype-highlight in the plugin chain. The rehype-highlight-code-lines also works with other code highlighters that have no line numbering and line highlighting features.

A snapshot from a working app:
markdown code block input
markdown code block result

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Jun 21, 2024
@wooorm wooorm merged commit 0807035 into rehypejs:main Jun 24, 2024
6 checks passed

This comment has been minimized.

@wooorm
Copy link
Member

wooorm commented Jun 24, 2024

Thanks!

@wooorm wooorm added 📚 area/docs This affects documentation 💪 phase/solved Post is done labels Jun 24, 2024
@github-actions github-actions bot removed the 🤞 phase/open Post is being triaged manually label Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 area/docs This affects documentation 💪 phase/solved Post is done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants