Skip to content

Commit

Permalink
Line Highlight: Extend highlight to full line width inside scroll con…
Browse files Browse the repository at this point in the history
…tainer (#3011)
  • Loading branch information
kuceb committed Aug 3, 2021
1 parent 63edf14 commit e289ec6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions plugins/line-highlight/prism-line-highlight.js
Expand Up @@ -195,6 +195,10 @@
});
}

mutateActions.push(function () {
line.style.width = pre.scrollWidth + 'px';
});

mutateActions.push(function () {
// allow this to play nicely with the line-numbers plugin
// need to attack to pre as when line-numbers is enabled, the code tag is relatively which screws up the positioning
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 e289ec6

Please sign in to comment.