Code blocks are ignoring language syntax highlighting and newlines #179
-
I just installed on ST3 today, havent looked at all documentation/issues. but after working a while to get the mathjax equation support to work I noticed that the code block is ignoring the syntax highlighting for my basic c++ block, as well as ignoring the new lines in the code i wrote. I appreciate the project, and thanks for the support! My example is Test-subl.md which yields: |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
Please provide your settings. |
Beta Was this translation helpful? Give feedback.
This comment has been minimized.
This comment has been minimized.
-
{
/*
Enable mathjax support for LaTeX formulas
To keep other extensions active, you can specify in the place of //etc..
*/
"enable_mathjax": true,
"js": [
"https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML",
"res://MarkdownPreview/js/math_config.js",
],
"markdown_extensions": [
"markdown.extensions.extra",
{
"pymdownx.arithmatex": {
"generic": true
}
},
{
"markdown.extensions.toc": {
"permalink": "\ue157"
}
}
//---- etc.
]
} |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Yep that fixed it, thanks! I had kept the //etc in there from the mathjax thread I was following on stackOverflow. In the future if I find a specific md feature not working as I expect it where should I look to figure out the specific md extension name so I can copy it over to my user setttings? Or would it just be better practice to copy over all the md extensions in the default settings? |
Beta Was this translation helpful? Give feedback.
-
I would copy everything over and only emove the things you don't want. |
Beta Was this translation helpful? Give feedback.
//--- etc.
doesn't help me see what is wrong, so let me say this, when you override plugins in your personal settings, you override all plugins, so make sure you include any and all that you wish to use. If you want syntax highlighting in blocks, you need to havepymdownx.superfences
in your plugin list. Look at the default settings and copy them over to your user settings.