When I have
<pre><code>
<div>
<MainTasks />
</div>
</code></pre>
the result becomes
<div>
<maintasks>
</maintasks></div>
Another example:
<head>
<title>NextStep App</title>
</head>
becomes
<title>NextStep App</title>
Hi @AnnotatedJS, I鈥檓 not too sure exactly what you鈥檙e referring to. Could you provide some additional details?
Whatever is being used to do the code boxes in reveal it changes the code. I'm writing some slides for a React class and it consistently changes Uppercase component names into lower case. It also likes to add & switch Tags around. So If you tried to do a component that was one line like
it might change it to:
I would say this isn't a question but a bug. @AnnotatedJS did you find a solution? I had a lot of trouble with the markdown working but if it works for you markdown has a code highlighter normally which might work better.
If your problem has to do with JSX upgrading the version of Highlight.js that is used in reveal will fix the problem.
The solution to this problem is to escape < and > in the code blocks.
<pre><code>
<head>
<title>NextStep App</title>
</head>
</code></pre>
is incorrect because the tags inside the <code> block will be interpreted as HTML by the browser. After escaping, the block looks like the following and renders as expected in the presentation
<pre><code>
<head>
<title>NextStep App</title>
</head>
</code></pre>
Most helpful comment
The solution to this problem is to escape
<and>in the code blocks.is incorrect because the tags inside the
<code>block will be interpreted as HTML by the browser. After escaping, the block looks like the following and renders as expected in the presentation