Defect #22046
closed
Markdown XML code blocks not properly supported
Added by T H almost 9 years ago.
Updated over 4 years ago.
Description
Markdown code blocks are blocks of text surrounded by three backticks (```
).
For example:
```xml
<example>test</example>
```
This should result in the following HTML:
<pre><code class="xml">
<example>test</example>
</code>< /pre>
(I can't seem to get the closing pre
-tag to show up properly, either!)
However, what is actually output is:
<pre>
<example>test</example>
</pre>
The result is that syntax highlighting does not work. If it is too much trouble to include the language (the class
attribute based on the language after the three backticks), it would be sufficient for me if the code was surrounded by
<code>…</code>
in addition to the
pre
-tags already in place.
This seems to work in general but not for XML. When I tried my example in Ruby, it did work. It seems to be related to the XML that I would like to display as “code”. Somehow, the XML-tags are passed to the browser and are being interpreted, i.e. swallowed, instead of being rendered.
- Subject changed from Markdown code blocks not properly supported to Markdown XML code blocks not properly supported
Bug still exists in 3.4.4
- Status changed from New to Needs feedback
I could not reproduce the issue on Redmine 3.4.6. Do you still experience the issue in the latest version?
The issue is with the redmine_highlightjs plugin. I disabled the plugin and got a correct rendering of the xml content after clearing all old cache data. I guess this can be closed then. Sorry for the troubles.
- Status changed from Needs feedback to Closed
- Resolution set to Invalid
T H wrote:
The issue is with the redmine_highlightjs plugin. I disabled the plugin and got a correct rendering of the xml content after clearing all old cache data. I guess this can be closed then. Sorry for the troubles.
Thanks for the feedback.
If you like redmine_highlightjs plugin, I recommend you to try improved syntax highlighting feature of Redmine 4.0. It supports more than 100 languages.
We upgraded to 4.1 recently and I can confirm that the new syntax highlighting is really good. We don't miss the old plugin at all :-)
Also available in: Atom
PDF