-
-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Callout is being displayed twice after pageToMarkdown
and toMarkdownString
#118
Comments
Oh I see where I messed up. Appreciate the PR I'll merge it and push a new release. Thanks :) |
Here it is #119 |
Thank you, @Mikescops, for your contribution, truly appreciate it! 😊 I’d love to hear your feedback or see your input on the development of v4. Let me know how it addresses your use case or if you have any other use cases to share. |
PR here: #120 |
Good catch, Tested it, look good. Will create a new release thank you :) This solves the issue however there are a lot of edge cases that still needs to be handled and one of them being: which ignores the child elements of the toggle and there are many such cases where a type of block can be accommodated inside another block. The real issue is how inconsistently blocks are handled during rendering, especially the ones with child blocks. Honestly, the code I wrote here is a mess, and that's on me. Going forward, We need to make sure we clean this up in v4 and have a consistent block processing method that fits well with the renderer plugin and also gives enough flexibility to users to customize without much hassle. |
Since this is not completely solved I'll mark it as candidate of v4 and probably plan out the development of v4. |
It's live now |
My Notion page contains a Callout block, and when doing:
The blockquote is rendered twice because pageToMarkdown takes the child block and already make them as markdown in the parent when building MD blocks. This operation is done another time when toMarkdownString parses the blocks again.
Example of mdblocks:
This can be easily solved by adding conditions in
notion-to-md.ts
file, I'll open a PR and let you look if it's the best solution.The text was updated successfully, but these errors were encountered: