feat: forward remaining export_to_markdown kwargs through save_as_markdown#662
Open
maxmilian wants to merge 1 commit into
Open
feat: forward remaining export_to_markdown kwargs through save_as_markdown#662maxmilian wants to merge 1 commit into
maxmilian wants to merge 1 commit into
Conversation
…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>
Contributor
|
✅ DCO Check Passed Thanks @maxmilian, all your commits are properly signed off. 🎉 |
Contributor
Merge Protections🟢 Merge protection satisfied — ready to merge. Show 1 satisfied protection🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
save_as_markdownalready forwards most ofexport_to_markdown's parameters, but five were missing, so callers usingsave_as_markdownsilently got the defaults for them:enable_chart_tables(defaultTrue)mark_annotations(defaultFalse)traverse_pictures(defaultFalse)allowed_meta_names(defaultNone)blocked_meta_names(defaultNone)This adds them as keyword-only arguments with the same defaults as
export_to_markdownand forwards them through.Why
Fixes #619 —
save_as_markdownshould expose the same output options asexport_to_markdownrather than dropping a subset to defaults.Notes
export_to_markdown, so existing behavior is unchanged.*), so no existing positional call tosave_as_markdownis affected.escaping_underscores→escape_underscoresnaming note from the earlier attempt (fix: forward missing kwargs from save_as_markdown to export_to_markdown #629) is already handled onmain, so it is intentionally left untouched here.