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 information about line numbering and line highlighting into documentation #32

Closed
wants to merge 2 commits into from

Conversation

talatkuyuk
Copy link
Contributor

@talatkuyuk talatkuyuk commented Jun 24, 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

It is about for adding information about line numbering and line highlighting into documentation, which is done via rehype plugin rehype-highlight-code-lines. An example has been provided as well.

Fixes #29

@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 24, 2024

This comment has been minimized.

@github-actions github-actions bot removed the 🤞 phase/open Post is being triaged manually label Jul 12, 2024
@wooorm
Copy link
Member

wooorm commented Jul 12, 2024

Hi again Talat, thanks for your patience, I was a bit busy. I took your take as inspiration and wrote a short example in the existing example section! Thank you.

Also: looks like the email you git commit with isn’t connected to your GitHub account; I think they describe how to add an email address here: https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address.

Or, perhaps, you accidentally added literal quotes locally in Git itself? 🤔

Finally, for your plugin:
your plugin supports a markdown syntax on how to highlight particular lines. That’s very useful!
But, these rehype plugins can also be used with plain HTML. So, I suggest to also support HTML attributes.
I’ve done something similar with rehype-twoslash recently, which accepts ```js twoslash but also class="language-js twoslash".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 phase/solved Post is done
Development

Successfully merging this pull request may close these issues.

Add support for line numbers
2 participants