You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched issues and couldn’t find anything (or linked relevant results below)
Problem
MDX is an ideal format for writing documents. It's versatile and simple. And yet it can't be used that way because of parsing errors of JSX. The user that is just writing a document (like docx), and not a webpage, is not accustomed an error just discarding the entire page.
Solution
Something akin to what tree-sitter does - localizing erroneous part and parsing it as text.
Alternatives
Nothing comes to mind that's better than proposed. Maybe rendering the older version of the page.
The text was updated successfully, but these errors were encountered:
@ChristianMurphy Unfortunately, using markdown is not viable for us, as it's too simple to satisfy customer needs. The authoring experience needs to be something like in obsidian, where you can type in the part, and it will not crash the app but just won't render properly. I presume the link you provided tackles the problem of syntax highlighting, but not previewing partial results?
I recommend that you keep around the last version that could render. Then if the user introduces a syntax error, you render the previous version instead.
Additionally I recommend to integrate Volar with MDX language service in your text editor, so you can display errors in the editor.
Initial checklist
Problem
MDX is an ideal format for writing documents. It's versatile and simple. And yet it can't be used that way because of parsing errors of JSX. The user that is just writing a document (like docx), and not a webpage, is not accustomed an error just discarding the entire page.
Solution
Something akin to what tree-sitter does - localizing erroneous part and parsing it as text.
Alternatives
Nothing comes to mind that's better than proposed. Maybe rendering the older version of the page.
The text was updated successfully, but these errors were encountered: