Add a NumberedHeadingStyle option to DefaultStyles#210
Merged
onizet merged 1 commit intoonizet:devfrom Aug 11, 2025
Merged
Conversation
|
Owner
|
Brillant! |
Merged
Contributor
Author
|
Hi @onizet, Today I was trying to upgrade our local package to the version on nuget, 3.2.6. Unfortunately we have some issues as the Thank you! |
Owner
|
Hello @DynaSpan , I messed up my packaging! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Hi!
At the company I work for, we use Word templates which contain normal headings (e.g.
Heading 1, etc.) and numbered headings (e.g.NumberedHeading 1etc.).This doesn't play nice with the current implementation of numbered headings in html2openxml. If you define a numbered heading within Word, you shouldn't add the numbering properties to the heading as this will mess up the style of the heading (spacings etc.).
This PR adds a new
NumberedHeadingStyleto theDefaultStyles. If theNumberedHeadingStyleis defined differently by the user thanHeadingStyle, this PR will not add a numbering property to the heading, keeping the numbered heading styling intact.This implementation ensures that current implementations keep working as-is, while opening up the styling for alternative use-cases (such as ours).