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 for Issue 90 - Font Sizing, Font Styling and Font Coloring is not working in Clippit 2.4.0 version #94

Merged

Conversation

MalcolmJohnston
Copy link
Contributor

Hello @sergey-tihon,

I believe that the issue flagged by @dhruvak26 and @ankushchepure is now fixed.

Thanks to @dhruvak26 for the files to reproduce the issue.

The problem was dealing with run properties that were different from the paragraph styles. The HTML formatting was blowing these away.

What I have done to resolve this is merge the run properties. The merge strategy is as follows:

  1. Get the run properties from the source document
  2. Get the run properties after processing
  3. For any elements that do not exist after processing, add them to the output

This means that styling in the HTML will override any styling in the template document, but if the HTML does not override then the source styles will be maintained.

I have added an additional test file (the one provided by @dhruvak26) to test case DA289. If you run the test then you should see that the output Word document maintains the styles.

@DhruvaK or @ankushchepure it would be good if one of you could verify that the results of the test are what you are expecting.

Cheers,
Malcolm

@sergey-tihon sergey-tihon merged commit b423c28 into sergey-tihon:master Jan 15, 2025
4 checks passed
@sergey-tihon
Copy link
Owner

sergey-tihon commented Jan 15, 2025

Thank you @MalcolmJohnston ❤️

Released in 2.4.2

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.

2 participants