L-a-r-t / chatgpt-to-notion

ChatGPT to Notion brings the cleverness of ChatGPT right into your Notion workspace!
https://chrome.google.com/webstore/detail/chatgpt-to-notion/oojndninaelbpllebamcojkdecjjhcle
332 stars 64 forks source link

Numbering of list blocks generated in Notion does not work properly #11

Open herohoro opened 1 year ago

herohoro commented 1 year ago

Screenshot 2023-03-12 at 13 09 40

Current situation

Screenshot 2023-03-12 at 13 18 53

Cause

Screenshot 2023-03-12 at 13 07 17 Screenshot 2023-03-12 at 13 09 15


I tried to partially fix const answerBlocks, but I don't know how to check it in the development environment, so I will just report it. I'm sorry.

L-a-r-t commented 1 year ago

Hi, thanks for reporting this issue!

Currently, the extension relies on an external parsing library (in fact it relies on a library that parses HTML to markdown and another that parses markdown to Notion API blocks, this might be inefficient but proved to be reliable and support any content generated by ChatGPT with little tuning on the extension's side)

Upon investigation, I found that the issue here is with the intermediate step of parsing HTML to Markdown, I will try to find a workaround to generate the blocks properly. I won't try to write my own parser however as it will very likely be less reliable that the existing solution. I'll give you an update on how this turns out :)

herohoro commented 1 year ago

Thank you very much for your detailed explanation. Your approach using NodeHtmlMarkdown and @tryfabric/martian for markdownToBlocks was very educational. I also think it's very important to minimize adjustments on the extension side. I will also try to find a good approach on my own⭐