mark icon indicating copy to clipboard operation
mark copied to clipboard

Numbered List Renders Incorrectly

Open ProfMoo opened this issue 3 years ago • 5 comments

Hi! Love the tool, thanks for all the hard work.

As far as I can tell, the expected behavior of numbered lists isn't coming through on Confluence. I'll provide my example:

========================

My markdown is here, with generic info substituted:

Generic intro

1. Run:

    ```bash
    important command here
    ```

    The output should look something like this:

    ```svg
    generic output here
    ```

2. Generic step 2

    ```bash
    kubie context cluster
    ```

3. Generic step 3

    ```bash
    kubie namespace <namespace>
    ```

===================================

Then, this is the output of the mark tool:

<p>Generic intro</p>

<ol>
<li><p>Run:</p>
<ac:structured-macro ac:name="code">
<ac:parameter ac:name="language">bash</ac:parameter>
<ac:parameter ac:name="collapse">false</ac:parameter>
<ac:plain-text-body><![CDATA[important command here]]></ac:plain-text-body>
</ac:structured-macro>

<p>The output should look something like this:</p>
<ac:structured-macro ac:name="code">
<ac:parameter ac:name="language">svg</ac:parameter>
<ac:parameter ac:name="collapse">false</ac:parameter>
<ac:plain-text-body><![CDATA[generic output here]]></ac:plain-text-body>
</ac:structured-macro>
</li>

<li><p>Generic step 2:</p>
<ac:structured-macro ac:name="code">
<ac:parameter ac:name="language">bash</ac:parameter>
<ac:parameter ac:name="collapse">false</ac:parameter>
<ac:plain-text-body><![CDATA[kubie context <env>.<cloud_provider>.<region>.data]]></ac:plain-text-body>
</ac:structured-macro>

<ol>
<li>Generic step 3:
<code>bash
kubie namespace &lt;namespace&gt;
</code></li>
</ol></li>
</ol>

=========================

So then in Confluence, step 3 shows up as a substep of step 2 due to the misplaced <li> and </li> markers. Any thoughts here are helpful, thanks :)

ProfMoo avatar Sep 17 '21 15:09 ProfMoo

Not to hijack someone elses bug report, but I noticed a similar behavior in unordered lists, it managed to get the indentation levels wrong. I was just coming to file a bug report when I spotted this and thought I'd just tack on it may be all lists!

apenney-beeswax avatar Sep 21 '21 15:09 apenney-beeswax

Same issue here, I'm not using numbered lists for now to have a consistent rendering on Confluence. @kovetskiy I'd like to help with this issue but I'm new to this project, hints are welcome :)

xens avatar Feb 02 '22 09:02 xens

@xens Could you provide an easy to reproduce use case?

kovetskiy avatar Feb 02 '22 10:02 kovetskiy

@kovetskiy sure!

Take as input the following Markdown file (which according to my MarkDown linter is valid)

<!-- Space: MySpace -->
<!-- Parent: temp -->
<!-- Title: test -->

# Header1

Some text1

* list item10
* list item11

# Header2

Some text2

* list item20
* list item21

# Header3

Some text3

* list item30

    ```shell
    echo "test"
    ```

* list item31

# Header4

Some text4

* list item40
* list item50

Will render like this in Confluence

image

And the generated HTML

<h1 id="header1">Header1</h1>

<p>Some text1</p>

<ul>
<li>list item10</li>
<li>list item11</li>
</ul>

<h1 id="header2">Header2</h1>

<p>Some text2</p>

<ul>
<li>list item20</li>
<li>list item21</li>
</ul>

<h1 id="header3">Header3</h1>

<p>Some text3</p>

<ul>
<li><p>list item30</p>
<ac:structured-macro ac:name="code">
<ac:parameter ac:name="language">shell</ac:parameter>
<ac:parameter ac:name="collapse">false</ac:parameter>
<ac:plain-text-body><![CDATA[echo "test"]]></ac:plain-text-body>
</ac:structured-macro>

<ul>
<li><p>list item31</p>

<h1 id="header4">Header4</h1>

<p>Some text4</p></li>

<li><p>list item40</p></li>

<li><p>list item50</p></li>
</ul></li>
</ul>

xens avatar Feb 04 '22 15:02 xens

I have the same experience with latest version

prokod avatar Apr 14 '22 06:04 prokod