question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HTML to Markdown converter missing list end for two consecutive lists

See original GitHub issue
<p><strong>Ordered</strong></p>
<ol>
  <li>Item 1</li>
  <li>Item 2</li>
  <li>Item 3</li>
</ol>
<ol>
  <li><a href="http://www.example.com">Example.com</a></li>
  <li><a href="http://www.google.com">Google</a></li>
  <li><a href="http://www.yahoo.com">Yahoo!</a></li>
  <li><a href="http://www.example.com">Another Example.com</a></li>
</ol>

Is converted to:

**Ordered**
1. Item 1
2. Item 2
3. Item 3

1. [Example.com](http://www.example.com)
2. [Google](http://www.google.com)
3. [Yahoo!](http://www.yahoo.com)
4. [Another Example.com](http://www.example.com)

instead of:

**Ordered**
1. Item 1
2. Item 2
3. Item 3

<!-- -->
1. [Example.com](http://www.example.com)
2. [Google](http://www.google.com)
3. [Yahoo!](http://www.yahoo.com)
4. [Another Example.com](http://www.example.com)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
vschcommented, Aug 3, 2017

@GomiGuchi, repo updated. Maven release in progress.

0reactions
praneethrreddycommented, Nov 26, 2020

@vsch I am facing similar issue while trying to convert md file to HTML. Ordered list is being rendered into first unordered list. Added double blank line to end the list as suggested here, https://github.com/vsch/flexmark-java/issues/132, but no luck. My md file data

Body

 * Bullet
    * Bullet
       * Bullet
 
 
1. Number
    1. Number
    2. Number  

Output:

<p>Body</p>
<ul>
<li>
<p>Bullet</p>
<ul>
<li>Bullet
<ul>
<li>Bullet</li>
</ul>
</li>
</ul>
</li>
<li>
<p>Number</p>
<ol>
<li>Number</li>
<li>Number</li>
</ol>
</li>
</ul>

Without adding a HTML comment in md file, is there any parsing option that I should try to solve this. Tried different List parsing options from here, https://github.com/vsch/flexmark-java/wiki/Extensions#list-parsing-options. But no luck. Could you please give some advice.

Read more comments on GitHub >

github_iconTop Results From Across the Web

order list <ol> without "start=" ? · Issue #132 · vsch/flexmark-java
Hi,@vsch I want to render the text: - 1. list1 - 2. list2 - 3. list3 But ... HTML to Markdown converter missing...
Read more >
Formatting style - mdformat 0.7.16 documentation
Once converted to HTML and rendered on screen, formatted Markdown should yield a result that is visually identical to the unformatted document.
Read more >
kramdown Syntax
The original Markdown syntax allows the markers of ordered and unordered lists to be mixed, the first marker specifying the list type (ordered...
Read more >
Markdown: continue numbered list - Stack Overflow
I solved this problem on Github separating the indented sub-block with a newline, for instance, you write the item 1, then hit enter...
Read more >
Markdown Service Tools - BrettTerpstra.com
Convert - HTML to Markdown: This Service “Markdownifies” HTML source, ... Lists - Bullet List/Numbered List: These two commands create and clean up...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found