refactor: isolate project catalog and file watch lifecycle

This commit is contained in:
2026-10-29 19:50:56 +08:00
parent 226ac30651
commit 0a1f356150
7 changed files with 555 additions and 271 deletions
+2 -1
View File
@@ -15,7 +15,8 @@ def test_resource_consumers_agree_on_examples_and_references(tmp_path):
assert [(r.url, r.line) for r in analyze_document(source).references] == [("real.png", 5)]
assert check_markdown_file(path) == []
assert check_export(source, path, "html") == []
assert MainWindow._referenced_local_paths(None, path) == {tmp_path / "real.png"}
from mdhelper.file_watch import FileWatchService
assert FileWatchService.referenced_local_paths(path) == {tmp_path / "real.png"}
def test_images_inside_links_and_html_attributes_have_correct_spans(tmp_path):