-
Notifications
You must be signed in to change notification settings - Fork 478
Open
Labels
left open for discussionIssue is resolved, but is being left open for visibility for discussionIssue is resolved, but is being left open for visibility for discussion
Description
Description
The readme mentions that the add_new method handles markdown formatting (and it does for some markdown elements like bold and italics) but it doesn't handle markdown for other "nested" blocks
page.children.add_new(TextBlock, title='Testing 1, 2, 3...\n - Testing \n - Another \n * [ ] Heres one more')
Results in 1 block of text:
Testing 1, 2, 3...
Testing
Another
[ ] Heres one more
Ideally it should result in 4 blocks like this:
Testing 1, 2, 3...
- Testing
- Another
- Heres one more
I've done some testing and these are the supported/unsupported markdown lists that I can gather:
Supported Markdown
- Bold
- Italics
- Links
- Inline code (
code
)
Unsupported Markdown
- Todos
- Lists (bullets, ordered lists, etc.)
- Headers
- Multi-line code blocks
- Horizontal rules
Since TextBlock is explicitly text, the current behavior makes sense, however maybe a new Block class is a better approach to handle the unique markdown parsing. Something like:
page.children.add_new(MarkdownBlock, title='Testing 1, 2, 3...\n - Testing \n - Another \n * [ ] Heres one more')
ashutoshsaboo
Metadata
Metadata
Assignees
Labels
left open for discussionIssue is resolved, but is being left open for visibility for discussionIssue is resolved, but is being left open for visibility for discussion