Skip to content
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

[tui][edi] editor component MD parser problem with block quotes #311

Open
nazmulidris opened this issue Feb 16, 2024 · 0 comments
Open

[tui][edi] editor component MD parser problem with block quotes #311

nazmulidris opened this issue Feb 16, 2024 · 0 comments

Comments

@nazmulidris
Copy link
Member

nazmulidris commented Feb 16, 2024

While looking at this issue, also explore

  1. the idea of using tree sitter instead of a custom MD parser, and
  2. a document based parser (like cmark) and customize that, to see if it is easier to create a reliable parser.
  3. this MD viewer is built using a PEG based parser (pest): https://github.com/henriklovhaug/md-tui/tree/main/src. PTAL for inspiration.

Use the debugger to fix this issue.

When a pre-existing code block exists, and an inline code item is added, then there are issues. The video recording demonstrates this.

293400516-ac27de22-ed6f-4396-aa1d-75a35a78e223.mp4

Here's the code:

https://github.com/r3bl-org/r3bl-open-core/blob/nazmulidris/edi-file-save-action/tui/src/tui/md_parser/parser.rs#L39

There are other bugs in the MD parser that should be fixed as well by exhaustively testing and fixing the parser. And updating the test suite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant