Skip to content

fix(line-break): make gdocs compatible line breaks#789

Merged
harbournick merged 2 commits intodevelopfrom
fix/bon/breaks
Aug 21, 2025
Merged

fix(line-break): make gdocs compatible line breaks#789
harbournick merged 2 commits intodevelopfrom
fix/bon/breaks

Conversation

@palmer-cl
Copy link
Copy Markdown
Collaborator

  • Make line breaks compatible in Google Docs
  • Requires br tags within a ptag to be wrapped in a run tag

Before:

Screenshot 2025-08-20 at 12 22 31 AM

After:

Screenshot 2025-08-20 at 12 18 07 AM

@harbournick harbournick requested a review from Copilot August 21, 2025 18:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes line break compatibility with Google Docs by ensuring that br tags within paragraphs are properly wrapped in run (w:r) tags, which is required for proper rendering in Google Docs.

  • Modifies the translateLineBreak function to wrap w:br elements in w:r (run) elements
  • Adds comprehensive test coverage to verify the new structure

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/super-editor/src/core/super-converter/exporter.js Updates translateLineBreak function to wrap br elements in run tags
packages/super-editor/src/tests/export/lineBreakExporter.test.js Adds new test file to verify line breaks are properly wrapped in run elements

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread packages/super-editor/src/core/super-converter/exporter.js
Copy link
Copy Markdown
Collaborator

@harbournick harbournick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@harbournick harbournick merged commit 3690c6e into develop Aug 21, 2025
7 checks passed
@harbournick harbournick deleted the fix/bon/breaks branch August 21, 2025 18:24
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.

3 participants