Defect #22046
closedMarkdown XML code blocks not properly supported
0%
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.
Updated by T H almost 9 years ago
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.
Updated by Toshi MARUYAMA almost 9 years ago
- Subject changed from Markdown code blocks not properly supported to Markdown XML code blocks not properly supported
Updated by Go MAEDA almost 6 years ago
- 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?
Updated by T H almost 6 years ago
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.
Updated by Marius BĂLTEANU almost 6 years ago
- 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.
Updated by Go MAEDA almost 6 years ago
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.
Updated by T H over 4 years ago
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 :-)