Repository navigation
fix(editor): convert only the html code block when updating a table - #62
Open
RaphaelFakhri wants to merge 1 commit into
Open
RaphaelFakhri wants to merge 1 commit into
RaphaelFakhri wants to merge 1 commit into
Conversation
Signed-off-by: Raphael Fakhri <153192858+RaphaelFakhri@users.noreply.github.com>
Contributor
|
✅ DCO Check Passed Thanks @RaphaelFakhri, all your commits are properly signed off. 🎉 |
Contributor
Merge Protections🔴 1 of 2 protections blocking · waiting on 👀 reviews
🔴 Require two reviewer for test updatesWaiting for
This rule is failing.When test data is updated, we require two reviewers
Show 1 satisfied protection🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
This branch has not been deployed
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.
convert_html_to_docling_tableextracts the```htmlcode block from the model reply, but then converts the full reply. HTML in the surrounding prose, such as a literal<table>or a quoted copy of the original table, is parsed as part of the result. The editor then replaces the table data with an empty table or with the original table.This change converts the extracted code block, as
convert_html_to_docling_documentandconvert_markdown_to_docling_documentalready do. When the reply has no code block, the full reply is still converted.Resolves #61
Tests
test_convert_html_to_docling_table_ignores_prose_mentioning_tagsandtest_convert_html_to_docling_table_ignores_tables_outside_code_blocktotests/test_base_functions.py. Both fail onmainand pass with the fix.pytest -m "not slow" tests: 166 passed, 3 skipped (base install).ruff check,ruff format --checkandmypy docling_agentpass.