From 994ae8a71a239580884ef8c704530f3d3f296d21 Mon Sep 17 00:00:00 2001 From: Gamosoft Date: Tue, 2 Dec 2025 12:00:39 +0100 Subject: [PATCH 1/2] changed regular expression for table detection --- frontend/app.js | 4 ++-- plugins/note_stats.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/app.js b/frontend/app.js index e560858..e1d3ae4 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -2968,8 +2968,8 @@ function noteApp() { // List items: lines starting with -, *, + or a number (e.g. 1., 10.), excluding tasks [-] const listItems = (content.match(/^\s*(?:[-*+]|\d+\.)\s+(?!\[)/gm) || []).length; - // Tables: separator rows containing both '|' and '---' - const tables = (content.match(/^(?=.*\|)(?=.*---).*$/gm) || []).length; + // Tables: markdown table separator rows (| --- | --- |) + const tables = (content.match(/^\s*\|(?:\s*:?-+:?\s*\|){1,}\s*$/gm) || []).length; // Link count const linkMatches = content.match(/\[([^\]]+)\]\(([^\)]+)\)/g) || []; diff --git a/plugins/note_stats.py b/plugins/note_stats.py index d3972d0..d1ebdb9 100644 --- a/plugins/note_stats.py +++ b/plugins/note_stats.py @@ -49,9 +49,9 @@ class Plugin: re.findall(r'^\s*(?:[-*+]|\d+\.)\s+(?!\[)', content, re.MULTILINE) ) - # Tables: count separator rows containing both '|' and '---' + # Tables: count markdown table separator rows (| --- | --- |) tables = len( - re.findall(r'^(?=.*\|)(?=.*---).*$', content, re.MULTILINE) + re.findall(r'^\s*\|(?:\s*:?-+:?\s*\|){1,}\s*$', content, re.MULTILINE) ) # Markdown link count From 2df28f0b27e83b53ab21d54220b12f72c1dc5071 Mon Sep 17 00:00:00 2001 From: Gamosoft Date: Tue, 2 Dec 2025 15:21:21 +0100 Subject: [PATCH 2/2] move theme selector to footer for more real estate (for now) --- frontend/index.html | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/frontend/index.html b/frontend/index.html index 14cedc8..a1969f9 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -733,7 +733,7 @@ :style="'width: ' + sidebarWidth + 'px; background-color: var(--bg-secondary); border-right: 1px solid var(--border-primary); min-width: 200px; max-width: 600px;'" > -