Skip to content

feat: forward remaining export_to_markdown kwargs through save_as_markdown#662

Open
maxmilian wants to merge 1 commit into
docling-project:mainfrom
maxmilian:feat/save-as-markdown-forward-kwargs
Open

feat: forward remaining export_to_markdown kwargs through save_as_markdown#662
maxmilian wants to merge 1 commit into
docling-project:mainfrom
maxmilian:feat/save-as-markdown-forward-kwargs

Conversation

@maxmilian

Copy link
Copy Markdown

What

save_as_markdown already forwards most of export_to_markdown's parameters, but five were missing, so callers using save_as_markdown silently got the defaults for them:

  • enable_chart_tables (default True)
  • mark_annotations (default False)
  • traverse_pictures (default False)
  • allowed_meta_names (default None)
  • blocked_meta_names (default None)

This adds them as keyword-only arguments with the same defaults as export_to_markdown and forwards them through.

Why

Fixes #619save_as_markdown should expose the same output options as export_to_markdown rather than dropping a subset to defaults.

Notes

  • Defaults are identical to export_to_markdown, so existing behavior is unchanged.
  • New parameters are keyword-only (added after *), so no existing positional call to save_as_markdown is affected.
  • The escaping_underscoresescape_underscores naming note from the earlier attempt (fix: forward missing kwargs from save_as_markdown to export_to_markdown #629) is already handled on main, so it is intentionally left untouched here.
  • Kept to a single-file, behavior-preserving change with no test-data changes; existing serialization/document tests pass locally (ruff, mypy, pytest, docs pre-commit hooks all green).

…kdown

save_as_markdown already forwards most of export_to_markdown's parameters
but was missing five: enable_chart_tables, mark_annotations,
traverse_pictures, allowed_meta_names and blocked_meta_names. Add them as
keyword-only arguments with the same defaults as export_to_markdown and
forward them through, so save_as_markdown can drive the same output options
without dropping silently to defaults.

Defaults are unchanged, so existing behavior and tests are unaffected.

Fixes docling-project#619

Signed-off-by: Max Hsu <maxmilian@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

DCO Check Passed

Thanks @maxmilian, all your commits are properly signed off. 🎉

@mergify

mergify Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🟢 Merge protection satisfied — ready to merge.

Show 1 satisfied protection

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

@maxmilian maxmilian marked this pull request as ready for review June 27, 2026 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: forward all export_to_markdown kwargs through save_as_markdown

1 participant