BookStackApp / BookStack

A platform to create documentation/wiki content built with PHP & Laravel
https://www.bookstackapp.com/
MIT License
15.49k stars 1.95k forks source link

Partly missing coloring in code section #5078

Closed TobiZog closed 4 months ago

TobiZog commented 5 months ago

Describe the Bug

In a code section (created with the markdown editor) are lines, which are not colored. In Markdown, all lines in the section are written in the same way.

Steps to Reproduce

I can't exactly tell, who this happened.

Expected Behaviour

Full colored source code

Screenshots or Additional Context

Result which I get: 2024-06-24_11-18

Source code:

<pre id="bkmrk-%3Cv-navigation-drawer"><code class="language-html">&lt;v-navigation-drawer&gt;
  &lt;v-list&gt;
    &lt;v-list-item title="My Application" subtitle="Vuetify" /&gt;
    &lt;v-divider /&gt;
    &lt;v-list-item link title="List Item 1"&gt;&lt;/v-list-item&gt;
    &lt;v-list-item link title="List Item 2"&gt;&lt;/v-list-item&gt;
    &lt;v-list-item link title="List Item 3"&gt;&lt;/v-list-item&gt;
  &lt;/v-list&gt;
&lt;/v-navigation-drawer&gt;
</code></pre>

Source code in Firefox's inspector: image

It seems that the wrong colored lines are false packaged.

Browser Details

Firefox 127.0.1 on Linux Mint

Exact BookStack Version

v24.05.2

ssddanbrown commented 4 months ago

Thanks for raising @TobiZog, I found that the underlying highlighting library by default would not accept custom self-closing tags by default, but there was an option to enabled this which I have done in adb7bf7016502ebdc8aafdbca422731dac0abbfc.

This change will be part of the next patch release.