docu-notion
                                
                                 docu-notion copied to clipboard
                                
                                    docu-notion copied to clipboard
                            
                            
                            
                        Numbered text in Notion is converted to bullet points in Markdown
This in Notion:

Creates this markdown:

notion-to-md (which docu-notion uses) does support numbered lists, so I don't know what's going wrong.
I did some research. There is code in a function modifyNumberedListObject which attempts to assign sequential numbers to block.numbered_list_item.number for each numbered_list_item; but the numbered-list blocks do not have this by the time I attempt to process them when writing a custom transformer. I did not determine whether the function is not called, called too late, or whether the number is being deleted somehow. Then, there is code in notion-to-md.ts which handles the numbered_list_item case which looks for that number, and not finding it, basically reverts to bulleted list. It's not clear why sequential numbering is even attempted. Markdown will handle that if the md file simply contains "1. " at the beginning of each numbered list item line. It's easy to make a custom transformer (or to change the numbered_list_item handler) to just do that. Possibly, the intent was just to make the input markdown more readable by using sequential numbers. However, one problem will remain: it is difficult to do a good job of making markdown restart numbering when desired. If notion-to-md simply puts a "1. " (or any other number) at the start of each numbered_list_item, markdown will number each series of such items starting at 1. This is often correct, but it's possible in Notion to continue a numbered-list number sequence after some intermediate material. Markdown can do this too, by indenting all the intermediate material by a tab (or four spaces). But I can discover no way for notion-to-md to know that it should do this. The block object received for a numbered_list_item, as far as I can tell, contains no indication of how it is numbered in Notion, (or which list it belongs to, or what preceding siblings it has, or anything similar that might help).
So, we merged a patch that makes them come out as numbered lists, but each separate list will be numbered from 1. I think the next step would be to fork notion-to-md and make a patch that keeps the numbered-list numbers in some form. Possibly submit it as a PR. If it's not accepted soon, or if we decide it's not clean enough to submit, we might be able to use yarn patch to modify the version of notion-to-md that we use. Then we can output items with the right numbers, and I think we confirmed that our output stage will use them, at least for the first item in a list.
The block object received for a numbered_list_item, as far as I can tell, contains no indication of how it is numbered in Notion
Right, see #35
Closing as this is fixed.