Skip to content

Commit

Permalink
Line Highlight: Account for offset when clamping ranges (#3518)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment authored Aug 23, 2022
1 parent 6b824d4 commit 098e300
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/line-highlight/prism-line-highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@

var start = +range[0];
var end = +range[1] || start;
end = Math.min(numberOfLines, end);
end = Math.min(numberOfLines + offset, end);

if (end < start) {
return;
Expand Down
2 changes: 1 addition & 1 deletion plugins/line-highlight/prism-line-highlight.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 098e300

Please sign in to comment.