Improving C,C++, C# Code Detection #7066
Replies: 5 comments
-
Hi, the code highlighting is configurable. Which options have you tried and what did you not manage to achieve? Please note that there is probably nothing to be done in Material for MkDocs per se. Either Pygments or Highlight.js would need to accept a change request. If you decide to contact them, please try to be more specific about what does not work for you and make sure to document what you have tried. |
Beta Was this translation helpful? Give feedback.
-
I haven't tried Highlight.js, im using this .yml configuration:
The issue i'm facing is that i don't like the result of the codeblock highlight, could you help me setting up highlight.js to make a test with? |
Beta Was this translation helpful? Give feedback.
-
All you need is in the documentation but since we don't have an example in our example repository yet, I just put one together. You need to change the code block to the language you want. |
Beta Was this translation helpful? Give feedback.
-
Converting to discussion, since this is essentially a customization request. |
Beta Was this translation helpful? Give feedback.
-
Hello @ValerioOniride, Looking at the demo here the whole I did a quick search for a Pygments Unity Lexer but found nothing, so you could be the first to make one 😃 I also tried the Highlight.js demo, and found that it did a better job with the Unity MenuItem example, properly tokenizing the |
Beta Was this translation helpful? Give feedback.
-
Context
After several attempts with the extra.css file and experimenting with different language combinations, including C#, I've concluded it's necessary to submit this request
Description
I would like to request an enhancement for the code block parsing capability, specifically to improve its recognition of key elements within C#, C++, and C code blocks. I suggest augmenting the parser to identify and classify these elements with a similar accuracy and granularity as demonstrated in the example provided in the Vsuals section."
Related links
Use Cases
Enhancing the API's code block parsing will improve code clarity for both authors and users, ensuring better communication of intended messages. This change will expedite learning and development within the community, aligning with the project's goal of providing accessible documentation and fostering collaboration.
Visuals
Before submitting
Beta Was this translation helpful? Give feedback.
All reactions