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

Syntax highlighting breaks when anything is after {} #480

Closed
4 tasks done
KianNH opened this issue Sep 16, 2024 · 4 comments
Closed
4 tasks done

Syntax highlighting breaks when anything is after {} #480

KianNH opened this issue Sep 16, 2024 · 4 comments
Labels
📦 area/deps This affects dependencies 💪 phase/solved Post is done 🐛 type/bug This is a problem

Comments

@KianNH
Copy link

KianNH commented Sep 16, 2024

Initial checklist

Affected packages and versions

unifiedjs.vscode-mdx v1.8.10

Link to runnable example

No response

Steps to reproduce

Paste the following snippets into separate MDX files:

{props.name}

```js
export const foo = "bar";
```

[foo](/bar/)
{props.name} a

```js
export const foo = "bar";
```

[foo](/bar/)

It looks like this can also be reproduced with GitHub's highlighting, so maybe it's an issue with the grammar?

Expected behavior

Both should have the same syntax highlighting.

Actual behavior

The second one, with a character after the brackets, has broken syntax highlighting.

Runtime

Node v21

Package manager

No response

OS

No response

Build and bundle tools

No response

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Sep 16, 2024
wooorm added a commit to wooorm/markdown-tm-language that referenced this issue Sep 16, 2024
@wooorm
Copy link
Member

wooorm commented Sep 16, 2024

Thanks! I think I have it.

@sebas1208
Copy link

I found a probably related issue with code blocks inside JSX components.

image

the closing tag is still recognized as ruby code.

This comment has been minimized.

@remcohaszing remcohaszing added 🐛 type/bug This is a problem 📦 area/deps This affects dependencies 💪 phase/solved Post is done labels Sep 19, 2024
@github-actions github-actions bot removed the 🤞 phase/open Post is being triaged manually label Sep 19, 2024
@remcohaszing
Copy link
Member

I found a probably related issue with code blocks inside JSX components.

That was a duplicate of #472, which was already resolved, but not yet released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 area/deps This affects dependencies 💪 phase/solved Post is done 🐛 type/bug This is a problem
Development

No branches or pull requests

4 participants