Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix duplicated br tags #2717

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SebKranz
Copy link

@SebKranz SebKranz commented Aug 21, 2024

This PR demonstrates the issue described in #2716 and a possible fix.

I'm marking this as draft, because I would like check a few more details:

  • are other tags affected (eg. w:tab)
  • I should probably create a new test rather than modifying the existing one

Fixes: #2716

@SebKranz SebKranz marked this pull request as draft August 21, 2024 08:25
@SebKranz SebKranz changed the title Duplicated br tags Fix duplicated br tags Aug 21, 2024
Copy link

codecov bot commented Oct 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (368aa43) to head (3a226cc).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #2717   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          281       281           
  Lines        14099     14099           
  Branches      1382      1382           
=========================================
  Hits         14099     14099           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dolanmiu dolanmiu marked this pull request as ready for review October 14, 2024 10:49
@dolanmiu
Copy link
Owner

dolanmiu commented Oct 14, 2024

Thank you, we came to the same conclusion

True, there could be other ones like w:tab which need testing

@dolanmiu
Copy link
Owner

You're right, tabs are also affected, I will fix this too

@SebKranz
Copy link
Author

Based on the list of allowed children at http://officeopenxml.com/WPtext.php, I think we should change this to only include w:Pr.

w:Pr is the only tag related to styling and all others represent visual elements that shouldn't be duplicated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

replacer duplicates line breaks when keepOriginalStyles: true
2 participants