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

MDX support #4

Closed
luwes opened this issue May 9, 2023 · 3 comments
Closed

MDX support #4

luwes opened this issue May 9, 2023 · 3 comments

Comments

@luwes
Copy link

luwes commented May 9, 2023

Does the markdown syntax also support MDX? it looks pretty good already.

I stumbled on some issues with another pkg brandonchinn178/sublime-mdx#1


This rule for highlighting import statements of the other pkg might be nice to add in this project

https://github.com/brandonchinn178/sublime-mdx/blob/main/MDX.sublime-syntax#L43-L48

@deathaxe
Copy link
Member

deathaxe commented May 9, 2023

It supports component tags and jsx interpolation via curly praces as specified by Astro syntax specs. I would need to look into MDX specs to tell whether it's enough.

I may look into supporting MDX at some point, but the proposed import implementation is not in the shape to be added here. Modern syntaxes should no longer use push...with_prototype especially not to push complex syntaxes such as JSX.

@deathaxe
Copy link
Member

It appears supporting import/export statements in Markdown (Astro) is not enough to fully support MDX.

Compared to CommonMark, MDX behaves completely different with regards to how content between "html" tags or components is treated.

It allows weird things like markdown blocks within html tags, but without "indented raw blocks" being supported.

<h1>

  # Heading 1

  - list
  - list

  > block quote  

</h1>

This is a fundamental difference to how current markdown syntax works.

@deathaxe
Copy link
Member

MDX support is planned to be provided by a dedicated package as it is unrelated to Astro.

see: https://github.com/SublimeText/MDX

It is requested for registration at packagecontrol.io as MDX to replace existing "MDX Syntax Highlighting" package.

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

2 participants