comments/test
saberzero1 d79ee3c4a0
fix: only suppress comments on explicit false / "false" override
Previously the frontmatter check suppressed comments on any falsy
value (0, "", null, false, "false"), which is wider than the
documented API (docs/features/comments.md only shows `comments: false`).

The refactor also removes the `as Record<string, unknown>` cast
dance that predated the plugin importing proper QuartzComponentProps.
fileData.frontmatter and cfg.baseUrl are now typed directly.

Regression tests cover:
- frontmatter.comments=false / "false" -> suppressed (documented)
- frontmatter.comments=true / "true" / undefined -> rendered
- frontmatter.comments=0 / "" / null -> rendered (behavior change)
- data attribute wiring and defaults
- cfg.baseUrl fallback chain

BEHAVIOR CHANGE: sites that relied on the prior permissive disable
logic (e.g. setting `comments: 0` to hide comments) will now see
comments rendered. Update to `comments: false` to restore the intent.
2026-04-16 15:43:08 +02:00
..
comments.test.ts fix: only suppress comments on explicit false / "false" override 2026-04-16 15:43:08 +02:00