Repository navigation
fix(docreader): preserve soft line breaks in PowerPoint table cells - #6150
Open
tumbledseea wants to merge 1 commit into
Open
tumbledseea wants to merge 1 commit into
tumbledseea wants to merge 1 commit into
Conversation
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.
Description
Pressing Shift+Enter in a PowerPoint table cell inserts a soft line break. When WeKnora imports the slide, python-pptx exposes that break as U+000B and the converter copies the control character into the Markdown table. A paragraph break in the same cell already produces
<br />.Normalize the PowerPoint soft break before escaping the cell. Both breaks now render inside the same table row. The regression test writes a real slide containing both kinds of break and checks the result through
Parser.parse_file.Type of Change
Related work
Follow-up to #6019, which covered paragraph breaks and pipes. The distinction between paragraph and soft breaks is documented in the python-pptx cell API.
Testing
On upstream main at
c378635, the new case failed with a literal U+000B between “line one” and “line two”. After the change the cell containsline one<br />line two<br />new paragraph.30 passed and 7 skipped. The skipped tests require optional PowerPoint fixtures or ImageMagick. Both table-cell tests passed. Validation was scoped to these conversion paths.
Checklist
git diff --check origin/main...HEADpassesThis change was prepared and tested with OpenAI Codex.