Skip to content

feat: add JSON export filtering and robust boolean coercion#24

Open
mcanouil wants to merge 2 commits into
mainfrom
review/v1.5.0
Open

feat: add JSON export filtering and robust boolean coercion#24
mcanouil wants to merge 2 commits into
mainfrom
review/v1.5.0

Conversation

@mcanouil
Copy link
Copy Markdown
Owner

@mcanouil mcanouil commented May 28, 2026

  • Add json-include whitelist of dot-separated paths to keep in the JSON export.
  • Add json-exclude blacklist of dot-separated paths to drop from the JSON export.
  • Add json-exclude-sensitive (default true) which redacts host filesystem paths: quarto.doc.input_file, quarto.doc.output_file, quarto.project.directory, quarto.project.output_directory, pandoc.PANDOC_SCRIPT_FILE.
  • Add json-warn-on-server (default true) which emits a warning when JSON export is enabled in a detected CI or server context (CI, GITHUB_ACTIONS, GITLAB_CI, CIRCLECI, TRAVIS, JENKINS_URL, BUILDKITE, TF_BUILD).
  • Coerce boolean metadata robustly: the json toggle now accepts raw Lua booleans, Pandoc MetaBool, and the strings 'true'/'false' (case-insensitive), replacing the brittle string comparison.
  • Reset module-level configuration state at the start of each Meta pass to prevent cross-document leakage in batch renders.
  • Document the JSON export schema and every new filtering option in the README and example.
  • Bump install snippets and _extension.yml to 1.5.0.

Adds whitelist (json-include), blacklist (json-exclude), sensitive-path
redaction (json-exclude-sensitive, default true), and a server-context
warning (json-warn-on-server, default true) for the JSON metadata export.
The json toggle now accepts raw Lua booleans, Pandoc MetaBool, and
case-insensitive 'true'/'false' strings, removing the brittle string
comparison on a stringified value.

Module-level configuration state is reset at the start of each Meta
pass so batch renders do not leak settings between documents.

Documents the JSON export schema and the new filtering options in the
README and example, and bumps the install snippets to 1.5.0.
@mcanouil mcanouil self-assigned this May 28, 2026
@mcanouil mcanouil added the Type: Enhancement 💡 Issues related to enhancements, improvements, new features, or new analyses label May 28, 2026
Defer version bumps in _extension.yml, README install snippet, and
example.qmd install snippet to the release workflow, matching repo
convention. Move the new CHANGELOG entries under '## Unreleased' and
drop the duplicate docs bullet that was already captured under the
'### Documentation' subsection.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Enhancement 💡 Issues related to enhancements, improvements, new features, or new analyses

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant