Fix InlineCodeHighlight styling and unknown-language fallback#704
Merged
AnnMarieW merged 3 commits intosnehilvj:masterfrom Mar 23, 2026
Merged
Fix InlineCodeHighlight styling and unknown-language fallback#704AnnMarieW merged 3 commits intosnehilvj:masterfrom
AnnMarieW merged 3 commits intosnehilvj:masterfrom
Conversation
Made-with: Cursor
Made-with: Cursor
Collaborator
|
Hi @antonymilne Thanks so much for reporting the issue and providing the fix! 🚀 This works great. We don't have a test for this, as we typically focus on tests for dash callbacks or props that are only in dmc and not Mantine. If you would like to add a test, it would be welcomed, but not required. Just need to add a changelog entry before merging. Thanks again! |
Contributor
Author
|
Hi @AnnMarieW, no worries! I've added a changelog now. I thought for a while about tests and couldn't figure out a very valuable way to do it for these changes so didn't add any, hope that's ok. 🙂 Do you know when this might be released? |
Collaborator
|
Thanks @antonymilne 💃 I should be able to get the next release done this week. |
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.
Hello! A vizro user noticed some weird behaviour that I've eventually traced back to two small bugs in
dmc.InlineCodeHighlight. This PR hopefully fixes both 🤞 I haven't updated any tests so please let me know if that's required!Here's an example app to show the bugs.
When you click the button you'll see:
dmc-code.css) and when you click the button, theCodeHighlightblock loads and injectsdmc-code.css, so the inline code style suddenly changes.VARinENV_VAR_NAME: unknown languages were highlighted as markdown, so you get unwanted syntax highlighting instead of plain textHere's what happens after the fix: the style of the inline code is correct from the beginning (no italic for unknown language) and doesn't change when you click the button.
