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

Add missing 'Normal' style #39

Merged
merged 1 commit into from
Aug 23, 2024
Merged

Conversation

AudunWA
Copy link
Contributor

@AudunWA AudunWA commented Aug 1, 2024

This fixes privateOmega/html-to-docx#180, where Heading styles "bleeds" over to normal text in paragraphs below, when viewed in macOS Pages.

The problem seems to be that all other defined styles are based on "Normal" (see w:basedOn in the same file), which didn't exist. Other docx viewers seems to handle this issue, but Pages renders it incorrectly.

@nicolasiscoding
Copy link
Member

@AudunWA thank you for this! I will assign a team member to QA this

@nicolasiscoding
Copy link
Member

@AudunWA On another note, is there a way to simulate this across our 3 different testing files we have to prevent regressions?

For example this file (and the other two)?
https://github.com/TurboDocx/html-to-docx/blob/main/example/example-node.js

@nicolasiscoding nicolasiscoding changed the base branch from main to develop August 13, 2024 21:14
@AudunWA
Copy link
Contributor Author

AudunWA commented Aug 15, 2024

@AudunWA On another note, is there a way to simulate this across our 3 different testing files we have to prevent regressions?

For example this file (and the other two)? https://github.com/TurboDocx/html-to-docx/blob/main/example/example-node.js

Thanks for taking a look at the PR. I'm not sure what you want me to do with the test files – there isn't supposed to be any changes in the input HTML. You could run the testing files in my branch and see that the output docx is changed, and from there open the generated files in Word/other editors to check for regressions.

@nicolasiscoding
Copy link
Member

@AudunWA - good point, will need to test this against the flavors of Msft office, libre, google docs, pages etc

@nicolasiscoding
Copy link
Member

@AudunWA

Tested on Libreoffice, Microsoft Office for the Desktop, Google Doc, Microsoft365/Word for the Web

@nicolasiscoding nicolasiscoding merged commit 3c1054c into TurboDocx:develop Aug 23, 2024
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.

Elements following headers get header style in Mac Pages
2 participants