-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Ignore single-line highlight which is out of wrap section #3475
Conversation
Thank you for the PR @lijyze! Unfortunately, I do not understand the problem you fixed. Could you please explain it in more detail? Maybe even provide some screenshots? |
@RunDevelopment Sorry for bad explanation. Let's say, if my code looks like this, it has only 3 lines of code. Now I want highlight some lines of it.
I think this make sense, it means highlight from the start of the range to the end of the code.
What have I done is ignore lines that exceed line numbers of code section when Thank you for reading this, I wish you a good day! |
Thank you for the detailed explanation! Instead of working around the different behavior of with and without So we could count the number of lines (once) and then do |
Similarly, we could also ignore (= not display) any ranges or single-lines if their |
Yeah! Your solution is much more elegant. |
Thank you for contributing @lijyze! |
When highlight a range, if its end line exceed the wrap section, prism highlight from start line of the rang to the end of wrap section. That's good.
When thing comes to a single line, prism highlight the last line of wrap section, that's weird.
So ,I make it a little different, if the single-line is out of wrap section, simply ignore this line.