Skip to content

fix(pptx): preserve soft line breaks with link formats - #13073

Closed
Harbor404 wants to merge 1 commit into
deepset-ai:mainfrom
Harbor404:fix/pptx-soft-line-breaks
Closed

Harbor404 wants to merge 1 commit into
deepset-ai:mainfrom
Harbor404:fix/pptx-soft-line-breaks

Conversation

@Harbor404

Copy link
Copy Markdown

Related Issues

Proposed Changes

PPTXToDocument only iterated over paragraph.runs when formatting links. This dropped <a:br/> soft line breaks because they are siblings of runs in the paragraph XML, so markdown and plain output concatenated text across the break.

The converter now walks the paragraph's content children in document order, preserving soft line breaks while still applying hyperlink formatting to runs. The default none behavior is unchanged.

  • Updated PPTXToDocument._process_paragraph() to preserve soft line breaks for markdown and plain link formats.
  • Added parameterized regression tests for both link formats.
  • Added a release note.

How did you test it?

  • Red test against the previous implementation:
    • hatch run test:unit test/components/converters/test_pptx_to_document.py -q --no-cov -k 'soft_line_break_preserved' --tb=short
    • 2 failed, 11 deselected
  • Focused test file:
    • hatch run test:unit test/components/converters/test_pptx_to_document.py -q --no-cov --tb=short
    • 13 passed
  • hatch run test:types haystack/components/converters/pptx.py
    • Success: no issues found in 1 source file
  • hatch run fmt-check haystack/components/converters/pptx.py test/components/converters/test_pptx_to_document.py
    • passed

Notes for the reviewer

This PR is a draft because the repository currently allows only one non-draft PR per community contributor, and #13059 is already open. It can be marked ready for review once that PR is merged or closed.

This PR was fully generated with an AI assistant. I have reviewed the changes and run the relevant tests.

Checklist

  • I have read the contributors guidelines and the code of conduct.
  • I have updated the related issue with new insights and changes.
  • I have added unit tests and updated the docstrings.
  • I used a conventional commit type for the PR title.
  • I have documented my code.
  • I have added a release note file, following the contributors guidelines.
  • I have run focused tests, formatting, and type checks.

@vercel

vercel Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

@Harbor404 is attempting to deploy a commit to the deepset Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Hi @Harbor404, thanks for your interest in contributing to Haystack! 🙏

⛔ First-time contributors can have at most 1 open pull request in this repository until it has been approved, so this PR was closed automatically. Your open pull request #13059 is unaffected. Once it has been approved by a maintainer, you are welcome to open more PRs. Feel free to reopen this one at that point.

See the contributing guidelines for details.

This is an automated message to help us keep the review queue healthy.

@github-actions github-actions Bot closed this Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PPTXToDocument drops soft line breaks when link_format is markdown or plain

1 participant