Skip to content

Commit

Permalink
Use faster comparison for heading detection
Browse files Browse the repository at this point in the history
  • Loading branch information
AbeJellinek committed Nov 3, 2023
1 parent a05ed9f commit 45cf955
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dom/snapshot/snapshot-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class SnapshotView extends DOMView<SnapshotViewState, SnapshotViewData> {
continue;
}
let headingFontSize = parseFloat(getComputedStyle(heading).fontSize);
if (headingFontSize / bodyFontSize <= 1) {
if (headingFontSize <= bodyFontSize) {
continue;
}

Expand Down

0 comments on commit 45cf955

Please sign in to comment.