From 76a120f6c8c19d7bbb25093027a8ae2315241ed5 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Fri, 23 Jun 2023 21:58:53 +0800 Subject: [PATCH] fix: incorrect highlight position by incorrectly using highlight position percentage which old highlights do not have it --- src/settings/template.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/settings/template.ts b/src/settings/template.ts index 7124a0f..3df576c 100644 --- a/src/settings/template.ts +++ b/src/settings/template.ts @@ -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);