Skip to content

Commit

Permalink
fix: incorrect highlight position by incorrectly using highlight posi…
Browse files Browse the repository at this point in the history
…tion percentage which old highlights do not have it
  • Loading branch information
sywhb committed Jun 23, 2023
1 parent 4e23a04 commit 76a120f
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/settings/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,6 @@ export const renderArticleContnet = async (
if (highlightOrder === "LOCATION") {
articleHighlights.sort((a, b) => {
try {
// sort by highlight position percent if available
if (
a.highlightPositionPercent !== undefined &&
b.highlightPositionPercent !== undefined
) {
return a.highlightPositionPercent - b.highlightPositionPercent;
}
if (article.pageType === PageType.File) {
// sort by location in file
return compareHighlightsInFile(a, b);
Expand Down

0 comments on commit 76a120f

Please sign in to comment.