Aymkdn / html-to-pdfmake

This module permits to convert HTML to the PDFMake format
https://aymkdn.github.io/html-to-pdfmake/index.html
MIT License
560 stars 88 forks source link

Nested Ordered List issue when assigning values to counter #138

Closed Mlowe11 closed 2 years ago

Mlowe11 commented 2 years ago

I've come across an issue when using html-to-pdfmake.

When I create an ordered list within an ordered list and using values that update the counter - the list item containing the nested ordered list does not update the counter that is included in the HTML.

For example :

<ol>
<li data-pdfmake="{&quot;counter&quot;:7}">One</li>
<li data-pdfmake="{&quot;counter&quot;:8}">Two
<ol>
<li data-pdfmake="{&quot;counter&quot;:6}">Three</li>
</ol>
</li>
<li data-pdfmake="{&quot;counter&quot;:7}">Four</li>
</ol>

Shows up as : 7.One 2.Two -> nested 6.Three 7.Four

Aymkdn commented 2 years ago

I'll have to investigate to see how to fix it.

Mlowe11 commented 2 years ago

I'll have to investigate to see how to fix it.

Thank you, let me know if you need some more info or context.

Aymkdn commented 2 years ago

The new version (v2.3.11) should solve this issue.

Mlowe11 commented 2 years ago

Hey, sorry I should've tested before giving a thumbs up but I just did a test and it still doesn't update the list item that's a part of the nested list. In the original example the 2.Two is still 2. instead of 8

Aymkdn commented 2 years ago

It works for me.

The result of your html : Screenshot_20220419-211634_Acrobat for Samsung.jpg

Make sure you updated with the last version.

Mlowe11 commented 2 years ago

Interesting, I definitely updated to latest version but perhaps there's something else going on. Thanks for responding so fast