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

Merged
merged 6 commits into from
Nov 20, 2024
Merged

Conversation

SebKranz
Copy link
Contributor

@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 (7f3c561) to head (ad201c8).
Report is 2 commits behind head on master.

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

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


🚨 Try these New Features:

@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
Contributor 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.

@dolanmiu dolanmiu merged commit dece0f5 into dolanmiu:master Nov 20, 2024
8 checks passed
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