-
Notifications
You must be signed in to change notification settings - Fork 406
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
[Feature/Bug]: Code blocks in the markdown file do not show as code highlighted text #1481
Comments
The styles are not getting loaded, for the view all pages it is working partially but also not as intended, and for the detail view with the code panel it is not working. Thanks for highlighting that issue. |
To my impression code highlighting just wasn't expected to work / targeted at anything else than the code panels so far. So we most likely only need to decide on whether we want to target for |
Even there it is not working. |
@JosefBredereck maybe I do have a misunderstanding here, but if I do open e.g. https://patternlab-handlebars-preview.netlify.app/?p=all the HTML code gets its highlighting: |
Ah, that's what you mean. I mean the left-hand site of that panel, where the .md content gets rendered. |
Yes, but not the content of the description. Take this for example: https://lab.n8d.studio/htwoo/htwoo-core/?p=atoms-grid It has somewhat rendered syntax highlighting, just the 'code' styles but does not tokenise it with primsjs. <pre><code class="language-css">.demo-item{
@include gridSpan(4);
}
</code></pre> |
I still think that's related to the selector & scope that we're using for the code formatter at the moment – this would either need to get added to that selector or – if we are in another component for this section on the left – a JavaScript call of that code formatter would need to get added for @StfBauer would you be able to contribute a PR for this problem, please? |
Sure, but I need some guidance on the project. |
I use Pattern Lab Node
v6.0.1
onWindows | Mac | Linux
, with Nodev16.15.1
, using aVanilla
Edition with a little bit of gulp flavoured on top of it.Expected Behavior
Code in the documentation markdown should get rendered as a code block like on the screenshot below:
Actual Behavior
Currently the behaviour is that markdown render formats it as a code block but primsjs do not kick in.
The screenshot from before I created by adding the syntax highlighter manually.
Steps to Reproduce
Createa pattern and add code inside the markdown file.
The text was updated successfully, but these errors were encountered: