diff --git a/.gitignore b/.gitignore index 9cc3a20..e15e740 100644 --- a/.gitignore +++ b/.gitignore @@ -48,8 +48,6 @@ CLAUDE.md # UI mockups and temporary files docs/ui-mockups/ -*.html -*.zip # Obsidian developer documentation (external reference) obsidian-developer-docs/ diff --git a/CHANGELOG.md b/CHANGELOG.md index cd0c560..e1f83c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## [Unreleased] +### Internal +- **Consistency fixes flagged in post-audit review** + - `addExcludedHeading` and `addExcludedPhrase` in `src/main.ts` routed their catch blocks through `console.error(...)`, while every other catch in the file uses `this.log(..., errorMessage(error))`. Updated the two outliers to match. Behavior change: the diagnostic message is now visible only when the user has debug logging enabled (the user-facing `Notice('Failed to add ...')` is unchanged). Pre-fix the message printed unconditionally; post-fix it's debug-gated like every other error path in the file. + - Removed `*.html` and `*.zip` rules from `.gitignore`. The `*.html` rule was redundant with the `docs/ui-mockups/` directory rule that already catches every HTML file in the working tree; the `*.zip` rule was a Phase-0-era defense-in-depth concern that the CI release pipeline made obsolete (the pipeline produces no zips). Removing both means future intentional HTML or zip files won't be silently swallowed. + ## [1.7.1] - 2026-05-13 ### Internal diff --git a/src/main.ts b/src/main.ts index 75b9819..39268e0 100644 --- a/src/main.ts +++ b/src/main.ts @@ -751,7 +751,7 @@ export default class CustomSelectedWordCountPlugin extends Plugin { (this.app as AppWithInternals).setting.openTabById(this.manifest.id); } catch (error) { - console.error('Error adding excluded heading:', error); + this.log('Error adding excluded heading:', errorMessage(error)); new Notice('Failed to add heading to exclusion list'); } } @@ -787,7 +787,7 @@ export default class CustomSelectedWordCountPlugin extends Plugin { (this.app as AppWithInternals).setting.openTabById(this.manifest.id); } catch (error) { - console.error('Error adding excluded phrase:', error); + this.log('Error adding excluded phrase:', errorMessage(error)); new Notice('Failed to add phrase to exclusion list'); } }