souvikinator / notion-to-md

Convert notion pages, block and list of blocks to markdown (supports nesting and custom parsing)
https://www.npmjs.com/package/notion-to-md
MIT License
1.08k stars 90 forks source link

Incorrect syntax for the orderest lists. #18

Closed ShubhamVerma1811 closed 2 years ago

ShubhamVerma1811 commented 2 years ago

Hey, For the ordered lists (numbered_list_item) , the incorrect syntax for unordered lists (bulleted_list_item) is rendered.

Expected:

1. Hey
2. There

Actual:

- Hey
- There

I have tried an approach that might be able to solve this issue #19. Happy to discuss on it.

hrithwikbharadwaj commented 2 years ago

Even I am having the same issue, is this fixed ?

ShubhamVerma1811 commented 2 years ago

Even I am having the same issue, is this fixed ?

It's not fixed. I am not getting enough time to work on this PR #19

I'll be glad if someone can take it up.

souvikinator commented 2 years ago

@hrithwikbharadwaj yes, this one is on hold because of some issue with the nested numbering. I'll try to fix the issue and release an update. Feel free to provide any input if you have any.

souvikinator commented 2 years ago

@ShubhamVerma1811 No issues. I'll try to comeup with a solution. Thanks for the input so far :+1:

raphtlw commented 2 years ago

This can be achieved by checking if block.has_children === true.

raphtlw commented 2 years ago

I'm currently fixing this issue. Will make a pull request soon.

raphtlw commented 2 years ago

I've fixed this issue, please take a look at #35 and do let me know if you guys have any feedback on code style, etc.

souvikinator commented 2 years ago

Hey thanks for the contribution. I'll review the code and let you know

souvikinator commented 2 years ago

This issue is fixed now in the latest release, v2.4.1 Thanks to everyone for the contribution :))