Project

General

Profile

Actions

Defect #22046

closed

Markdown XML code blocks not properly supported

Added by T H almost 9 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Text formatting
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

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.

Actions #1

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.

Actions #2

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
Actions #3

Updated by T H over 6 years ago

Bug still exists in 3.4.4

Actions #4

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?

Actions #5

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.

Actions #6

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.

Actions #7

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.

Actions #8

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 :-)

Actions

Also available in: Atom PDF