We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a113cc commit 07afb48Copy full SHA for 07afb48
highlight-helper.js
@@ -1308,8 +1308,8 @@ function Highlighter(options = hhDefaultOptions) {
1308
mergedRect.width = rect.width;
1309
}
1310
// Process then remove rects that apply to the current line
1311
- const minLeft = Math.min(mergedRect.x, rect.x);
1312
- const maxRight = Math.max(mergedRect.right, rect.right);
+ const minLeft = Math.max(paragraphRect.left, Math.min(mergedRect.x, rect.x));
+ const maxRight = Math.min(paragraphRect.right, Math.max(mergedRect.right, rect.right));
1313
mergedRect.width = maxRight - minLeft;
1314
mergedRect.x = minLeft;
1315
unmergedRects.splice(r, 1); r--;
0 commit comments