Skip to content

Build your personal knowledge base with Trilium Notes

feat(highlights): ignore footnotes

Elian Doran1dcc839bab6f
diff --git a/src/public/app/widgets/highlights_list.ts b/src/public/app/widgets/highlights_list.ts
index 8729f73058..589d54682f 100644
--- a/src/public/app/widgets/highlights_list.ts
+++ b/src/public/app/widgets/highlights_list.ts
@@ -247,6 +247,13 @@ export default class HighlightsListWidget extends RightPanelWidget {
const subHtml = match[0];
const startIndex = match.index;
const endIndex = combinedRegex.lastIndex;
+
+ // Ignore footnotes.
+ if (subHtml.startsWith('<strong><a href="#fnref')) {
+ continue;
+ }
+
+ console.log(subHtml);
if (prevEndIndex !== -1 && startIndex === prevEndIndex) {
// If the previous element is connected to this element in HTML, then concatenate them into one.
$highlightsList.children().last().append(subHtml);