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 line highlighting support #9

Closed
allejo opened this issue Sep 19, 2019 · 2 comments · Fixed by #10
Closed

Add line highlighting support #9

allejo opened this issue Sep 19, 2019 · 2 comments · Fixed by #10
Labels
help wanted Extra attention is needed

Comments

@allejo
Copy link
Contributor

allejo commented Sep 19, 2019

The CommonMark spec allows for any arbitrary content to exist in the info string of a code block. Would you be open to adding support for highlighting specific lines of code within said code block?

```html{2}
<div>
  <p>I wish I wish I was a fish</p>
</div>
```

Proposed Syntax

  • html{4} - highlight the 4th line of the code block
  • html{4-5} - highlight the 4th through 5th lines of code
  • html{1,4-5} - highlight the 1st and 4th through 5th line of code separately
@sebastiandedeyne
Copy link
Member

I'd very much be interested in this!

I don't really have time to implement this myself atm, but I'll gladly accept a PR.

@sebastiandedeyne sebastiandedeyne added the help wanted Extra attention is needed label Sep 19, 2019
@allejo
Copy link
Contributor Author

allejo commented Sep 20, 2019

Sure thing! I can work on a PR for this, just wanted to make sure it'd be received favorably before I worked on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants