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
A string in {curly braces} within the body of a document is being parsed as an MDX expression, then throwing as there's no node handler for it. The same text content is processed ok by MDX evaluate/parse itself, so it looks like it relates to the conversion pipeline between markdown and Lexical.
Example content
Find your video at:
https://player.evideo.com/video?video-id={your-video-id}> Replace `your-video-id` with your video id
The part in {curly braces} blew up the editor, but not the MDX processor (mdx-js evaluateSync), which rendered it fine unescaped. The editor error was:
Error: Cannot handle unknown node `mdxTextExpression`
at Object.unknown (webpack-internal:///(:3000/admin/app-pages-browser)/./node_modules/@mdxeditor/editor/node_modules/mdast-util-to-markdown/lib/index.js:120:11)
at Object.one [as handle] (webpack-internal:///(:3000/admin/app-pages-browser)/./node_modules/zwitch/index.js:112:17)
at toMarkdown (webpack-internal:///(:3000/admin/app-pages-browser)/./node_modules/@mdxeditor/editor/node_modules/mdast-util-to-markdown/lib/index.js:85:24)
at visit (webpack-internal:///(:3000/admin/app-pages-browser)/./node_modules/@mdxeditor/editor/dist/importMarkdownToLexical.js:78:156)
at eval (webpack-internal:///(:3000/admin/app-pages-browser)/./node_modules/@mdxeditor/editor/dist/importMarkdownToLexical.js:68:45)
Thank you, I will test that. To ensure I'm not missing something, in that case, you would rather not have any special processing of the {your-video-id} token, right?
Yup, absolutely - it should be just string content in the link (in this case). Looking at the docs for mdast-util-mdx-expression, I think the whitespace around braces should be treated as significant, although I'm not clear on exactly what the spec is. mdx-js itself doesn't try to parse it (at least in my pipeline), so maybe I don't have that plugin enabled for rendering pages?
A string in
{curly braces}
within the body of a document is being parsed as an MDX expression, then throwing as there's no node handler for it. The same text content is processed ok by MDX evaluate/parse itself, so it looks like it relates to the conversion pipeline between markdown and Lexical.Example content
The part in
{curly braces}
blew up the editor, but not the MDX processor (mdx-js evaluateSync), which rendered it fine unescaped. The editor error was:Originally posted by @dave-db in #312 (reply in thread)
The text was updated successfully, but these errors were encountered: