Skip to content

Commit

Permalink
fix: background height calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
BartoszGrajdek committed Jun 3, 2024
1 parent fea12c7 commit 02e233f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/web/parserUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ function handlePreBlockBackground(target: HTMLElement, markdownStyle: PartialMar
let left = 0;
preRects.forEach((preRect) => {
if (width < preRect.width) width = preRect.width;
height += preRect.height;
if (!top || top > preRect.top) top = preRect.top;
height = preRect.bottom - top;
if (!left || left > preRect.left) left = preRect.left;
});
const {top: divTop, left: divLeft} = target.getBoundingClientRect();
Expand Down

0 comments on commit 02e233f

Please sign in to comment.