Skip to content

Commit e289ec6

Browse files
authoredAug 3, 2021
Line Highlight: Extend highlight to full line width inside scroll container (#3011)
1 parent 63edf14 commit e289ec6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
 

‎plugins/line-highlight/prism-line-highlight.js

+4
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@
195195
});
196196
}
197197

198+
mutateActions.push(function () {
199+
line.style.width = pre.scrollWidth + 'px';
200+
});
201+
198202
mutateActions.push(function () {
199203
// allow this to play nicely with the line-numbers plugin
200204
// need to attack to pre as when line-numbers is enabled, the code tag is relatively which screws up the positioning

‎plugins/line-highlight/prism-line-highlight.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)