Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numbered List Renders Incorrectly #117

Open
ProfMoo opened this issue Sep 17, 2021 · 5 comments
Open

Numbered List Renders Incorrectly #117

ProfMoo opened this issue Sep 17, 2021 · 5 comments

Comments

@ProfMoo
Copy link

ProfMoo commented Sep 17, 2021

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

@apenney-beeswax
Copy link

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!

@xens
Copy link

xens commented Feb 2, 2022

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

@kovetskiy
Copy link
Owner

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

@xens
Copy link

xens commented Feb 4, 2022

@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>

@prokod
Copy link
Contributor

prokod commented Apr 14, 2022

I have the same experience with latest version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants