Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions logseq_cli/commands/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,16 +212,15 @@ def _is_incidental_page(name: str) -> bool:
stripped = name.strip()
if len(stripped) < 3:
return True
# Also a date in file-name form (2025_10_10, 2025-10-10, 2025/10/10): digits
# and separators only, a journal under another spelling, not a gap.
if not any(c.isalpha() for c in stripped):
return True
if re.fullmatch(r"[\W_]+", stripped):
return True
# A name opening with punctuation is a tag that swallowed one: "#-AI"
if not (stripped[0].isalnum() or stripped[0] in "_@"):
return True
# 2025_10_10, 2025-10-10, 2025/10/10 — a journal, not a gap
if re.fullmatch(r"\d{4}[-_/]\d{1,2}[-_/]\d{1,2}", stripped):
return True
# An unclosed bracket dragged in from prose: "#Active)", "3b82f6)".
if stripped.endswith(")") and "(" not in stripped:
return True
Expand Down
3 changes: 2 additions & 1 deletion tests/test_read_only_commands_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ class TestFindKnowledgeGapsIgnoresArtefacts:
them, while "596 orphaned pages" reads as a call to action.
"""

ARTEFACTS = [")", "-", "1", "272", "-AI", "2025_10_10", "..."]
ARTEFACTS = [")", "-", "1", "272", "-AI", "2025_10_10", "2025-10-10",
"2025/10/10", "..."]

def _graph(self, extra=(), trees=None):
names = [*self.ARTEFACTS, "Real Knowledge Page", *extra]
Expand Down
Loading