JankariTech / web-app-presentation-viewer

ownCloud Web extension to view markdown presentation slides
Apache License 2.0
4 stars 1 forks source link

[Bug]: a list with a code-block inside of the list get messed up by a space before the list #42

Open individual-it opened 7 months ago

individual-it commented 7 months ago

Is there an existing issue for this?

Describe the bug

If a presentation contains a list with multiline codeblocks inside of the list but there is a space in an empty line before the list, it get seperated

Steps To Reproduce

see the output of this presentation:


1. point one
a=a+b;
```
  1. point two

    a=a+b;

!Note that there is a single space in the first empty line!

Expected Behavior

one list (ol element) should be generated

Actual Behavior

two ol elements are generated:

<ol>
<li>point one</li>
</ol>
<pre class="code-wrapper"><code class="hljs language-ini" data-highlighted="yes"><span class="hljs-attr">a</span>=a+b<span class="hljs-comment">;</span></code></pre><ol start="2">
<li>point two</li>
</ol>
<pre class="code-wrapper"><code class="hljs language-ini" data-highlighted="yes"><span class="hljs-attr">a</span>=a+b<span class="hljs-comment">;</span></code></pre>

### Examples, Code Samples, or Screenshots

deleting that single space fixes it:
  1. point one

    a=a+b;
  2. point two

    a=a+b;

Environment

- **OS**: Ubuntu 22.04
- **ownCloud Web**: ownCloud Web UI 8.0.0
- **oCIS**: Infinite Scale 5.0.0-RC4

What browsers are you seeing the problem on?

Firefox

saw-jan commented 3 weeks ago
Expected Actual
Screenshot from 2024-09-09 14-42-54 Screenshot from 2024-09-09 14-43-15
saw-jan commented 3 weeks ago

marked library rendered the correct elements. It looks like the revealjs library does something that changes the parsed elements.