From bb5d5ae14eb482c8a44b472498d08f82f9cd9bff Mon Sep 17 00:00:00 2001 From: Amy Gale Ruth Bowersox Date: Sat, 24 Aug 2024 02:01:04 -0600 Subject: [PATCH] instead of hardcoding .dragonglass as ignored, we ignore the config file --- src/dragonglass/config.py | 1 + src/dragonglass/tree.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dragonglass/config.py b/src/dragonglass/config.py index 2985409..16440b2 100644 --- a/src/dragonglass/config.py +++ b/src/dragonglass/config.py @@ -109,6 +109,7 @@ class Context: if config_path.exists() and config_path.is_file(): with open(config_path, "rb") as f: self.config = tomllib.load(f) + self._ignore_patterns.append(config_filename) # Load several base variables. templates_section = self.config.get("templates", {}) diff --git a/src/dragonglass/tree.py b/src/dragonglass/tree.py index 4f4ded2..38519c1 100644 --- a/src/dragonglass/tree.py +++ b/src/dragonglass/tree.py @@ -14,8 +14,7 @@ logger = logging.getLogger(__name__) """The paths that are always to be ignored.""" STATIC_IGNORE = [ - '.obsidian', - '.dragonglass' + '.obsidian' ] """The path matching Markdown files."""