gatsby-remark-highlight-code
gatsby-remark-highlight-code copied to clipboard
Config for prismjs?
I'd like to disable the left-trim config from Prismjs. Is there a way to change this behaviour?
https://prismjs.com/plugins/normalize-whitespace/
Well, I believe it's a config related to prismjs; but not sure. My code does not have proper indentation. This is how it looks:

This is how the markdown looks:

I see.. Might be related to: https://github.com/deckgo/gatsby-remark-highlight-code/issues/53 when adding nowrap.
If I add pre-wrap indentation is back, but then I get wordwrap.
Is there a way to achieve both?
This is my workaround for now, although hacky:
deckgo-highlight-code {
--deckgo-highlight-code-white-space: pre-wrap;
--deckgo-highlight-code-container-width: 200vw;
}
No options are currently implemented to set the normalize whitespace options of PrismJS.
I'm not against it and PR are welcomed. It would need one in the component and then another PR to add the options to this plugin parser.
Likewise, if a CSS variable is missing, happy to welcome more variables or part.