feat: add addThemeNameToClass
option, fixes #373
#376
Closed
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.
Add a test if possible
Format all commit messages with Conventional Commits
Did my best here, unsure if this is proper formatting, happy to fix with a squash commit if necessary.
Added a new
addThemeNameToClass
option forHtmlOptions
to enable adding the theme name to the generated HTML class. This leaves the current functionality as-is and makes this new feature opt-in for anyone that wants it.Previous behavior (and with the option disabled by default):
New Behavior (with the option enabled):
I'm unsure about testing conventions here, so I added a test to both
simple.test.ts
andcomprehensive.test.ts
that should exercise the functionality. All tests continue to pass with these changes.There is still a failing test in
styleAttributes.test.ts
but it's also failing inside themain
branch. I don't have the full context to feel comfortable changing it to pass, but I would be happy to add changes necessary to fix it if it's simple and doesn't muddy the understanding of this PR.