order list <ol> without "start=" ?
See original GitHub issueHi,@vsch I want to render the text:
- 1. list1
- 2. list2
- 3. list3
But i get the result
<ul>
<li>
<ol>
<li>list1</li>
</ol>
</li>
<li>
<ol>
<li>list2</li>
</ol>
</li>
<li>
<ol>
<li>list3</li>
</ol>
</li>
</ul>
i want to add the “start” attr to the <ol> except first <ol>,like:
<ul>
<li>
<ol>
<li>list1</li>
</ol>
</li>
<li>
<ol start="2">
<li>list2</li>
</ol>
</li>
<li>
<ol start="3">
<li>list3</li>
</ol>
</li>
<li>
<ul>
My code
private static final DataHolder OPTIONS = PegdownOptionsAdapter.flexmarkOptions(
(Extensions.ALL_WITH_OPTIONALS )
).toMutable()
.set(HtmlRenderer.FENCED_CODE_LANGUAGE_CLASS_PREFIX,"")
.set(HtmlRenderer.INDENT_SIZE, 2)
.set(Parser.LISTS_ITEM_INDENT, 2)
.set(TablesExtension.MIN_SEPARATOR_DASHES, 1)
private static final Parser parser = Parser.builder(OPTIONS).build();
private static final HtmlRenderer renderer = HtmlRenderer.builder(OPTIONS).build();
Could you give me some advice?
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
<ol>: The Ordered List element - HTML - MDN Web Docs
This Boolean attribute specifies that the list's items are in reverse order. Items will be numbered from high to low. start. An integer...
Read more >HTML ol start Attribute - W3Schools
The start attribute specifies the start value of the first list item in an ordered list. This value is always an integer, even...
Read more >Ordered List (ol) showing up un-numbered? - Stack Overflow
It's going to be a CSS issue. CSS can change the numbering/bullet style, and even turn it off altogether. Using Firebug, inspect the...
Read more >Ordered List in HTML – OL Tag Example - freeCodeCamp
An ordered list is a list in which the items are numbered and the order matters. This is as opposed to an unordered...
Read more >HTML Lists - Without unordered ul, order ol & definition dl
The start attribute allows to indicate the start value, by which the ordered list has to start, this being a numeric value, in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@GomiGuchi, issue opened #138
@GomiGuchi, in general it is impossible to convert HTML to Markdown and have the markdown generate the same HTML. Markdown down is much more limited.
The HTML Parser is not intended as a 100% accurate conversion because it is not possible. It is more of a convenience for converting HTML to Markdown that should be examined and edited for desired results.
That said, if something obvious is messed up like the HTML to Markdown converter generating two consecutive lists without an intervening HTML comment then this is a bug in the HTML to Markdown converter. This needs its own issue. I’ll open it.