Skip to content
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

#include <xc.h> should look like that in Cpp and not be seen as html markup, also comparaison and << >> bit manipulation #2441

Closed
blotfi opened this issue Jun 29, 2020 · 5 comments

Comments

@blotfi
Copy link

blotfi commented Jun 29, 2020

Language
C and C++

Additional resources
the issue is for includes compilation directives #include <xc.h>
it works well with file
<pre data-src="code/TP0/cmde.c"></pre>
but not if it is included in the html

<pre data-start="0" ><code class="language-cpp line-numbers">
#include <xc.h>
return;
#ifdef NON
void list()
{
}

if not possible to add it, how can I not use markup
or I am obliged to change all my < into &lt; manually? (boring)
thanks

@RunDevelopment
Copy link
Member

You can use the Unescaped Markup plugin.

However, if you use Unescaped Markup's comment style, be sure to not use the --> operator in your code. 😄

@blotfi
Copy link
Author

blotfi commented Jun 29, 2020

yes I tried it and it didn't work

and now after multiple tries I know why it was not working for me

https://prismjs.com/plugins/unescaped-markup/
if you don't ask for
Markup + HTML + XML + SVG + MathML + SSML + Atom + RSS 2.15KB
it will not work

So you should clearly mention this on the page: https://prismjs.com/plugins/unescaped-markup/
Or if you check this plugins, automatically it checks the 1st syntax option

so for my C/C++/JSON the minimum I need is;
https://prismjs.com/download.html#themes=prism&languages=markup+clike+c+cpp+json&plugins=line-numbers+file-highlight+keep-markup+unescaped-markup

@RunDevelopment
Copy link
Member

I had no idea that the plugin required Markup... It doesn't even use it, it's just a requirement... I'll remove the requirement.

@RunDevelopment
Copy link
Member

The requirement is removed now. You can remove Markup from your build.
Sorry for the inconvenience.

@blotfi
Copy link
Author

blotfi commented Jun 29, 2020

I confirm, it works now without the markup.
At least, we found this bug!
You can now close this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants