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

File highlight plugin: Support line ranges #1812

Closed
RunDevelopment opened this issue Mar 15, 2019 · 4 comments
Closed

File highlight plugin: Support line ranges #1812

RunDevelopment opened this issue Mar 15, 2019 · 4 comments

Comments

@RunDevelopment
Copy link
Member

RunDevelopment commented Mar 15, 2019

Description
When writing tutorials, it's useful to only display parts of a file, so only line x to line y. The File highlight plugin should support this functionality.

The idea is that you can add an additional data-range attribute to the <pre> and it will only display the lines in that range. E.g. data-range="1,5".

This should be compatible with Line numbers.


Continuation of #1810

@atomize
Copy link
Contributor

atomize commented Mar 16, 2019

Hooray! thanks for the infoz on how to build... I think this is good to go: #1813 - seems to be working on the page build and I over commented the additions in the source file just in case. 🤓
Note that I changed the File-Highlight plugin index.html to demonstrate it working. You may or may not want to keep this/let me know how you would like it to be if you need me to do that as well.

@atomize
Copy link
Contributor

atomize commented Mar 16, 2019

hmm not sure why this time it seems to be failing checks. any insight? #1813
edit:
nevermind, some gulp thing from my package.json... I got it.

@jianghong3
Copy link

If the requirement is 1-4 lines are highlighted green and 5-8 lines are highlighted red, what should I do?

@RunDevelopment
Copy link
Member Author

Closed by d38592c,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants