Skip to content

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

@individual-it

Description

@individual-it

Is there an existing issue for this?

  • I have searched for an existing issue

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;
    ```
2. 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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions