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 is broken for Fragments & components that start with valid Unicode characters #191

Closed
4 tasks done
Enteleform opened this issue Jan 11, 2022 · 1 comment · Fixed by #317
Closed
4 tasks done
Labels
🐛 type/bug This is a problem 🦋 type/enhancement This is great to have

Comments

@Enteleform
Copy link

Enteleform commented Jan 11, 2022

Initial checklist

Affected packages and versions

0.23

Steps to reproduce

Example 1

<>

  <Ḟoo class="Bar">
    Some Content
  </Ḟoo>

  <Foo class="Bar">
    Some Content
  </Foo>
  
</>

Example 2

<Ḟoo class="Bar">
  Some Content
</Ḟoo>

<Foo class="Bar">
  Some Content
</Foo>

Expected behavior

Syntax highlighting should match the built-in javascriptreact syntax when using:

Actual behavior

Syntax highlighting is broken.

image

Runtime

Node v16

Package manager

yarn v1

OS

Windows

Build and bundle tools

Vite

@vicary
Copy link

vicary commented Jan 1, 2023

Adding to the context, a simple double line-break will break the syntax highlighting.

It doesn't matter if it's a Fragment or a simple <p>, breaks in both cases.

Works Doesn't Work
Screenshot 2023-01-01 at 15 28 48 Screenshot 2023-01-01 at 15 28 57

The same thing also happens within JSX syntax.

Works Doesn't Work
Screenshot 2023-01-01 at 15 36 14 Screenshot 2023-01-01 at 15 36 28

@wooorm wooorm added help wanted 🙏 This could use your insight or help and removed PR welcome labels Mar 1, 2023
wooorm added a commit that referenced this issue Mar 21, 2023
This now pulls in a grammar for from:
<https://github.com/wooorm/markdown-tm-language>.

It fixes a bunch of previous errors and adds real support for MDX.
It also supports YAML frontmatter, TOML frontmatter, GFM (autolink
literals, footnotes, strikethrough, tables, tasklists), GitHub (gemoji,
mentions, references).
There’s support for about 20 common embedded grammars in fenced code
blocks.
Embedded code (in fenced code blocks, or in ESM/expressions) is now
marked as being the correct language, which makes comments and such
work.

Closes GH-183.
Closes GH-191.
Closes GH-209.
Closes GH-221.
remcohaszing added a commit that referenced this issue Mar 23, 2023
This now pulls in a grammar for from:
<https://github.com/wooorm/markdown-tm-language>.

It fixes a bunch of previous errors and adds real support for MDX.
It also supports YAML frontmatter, TOML frontmatter, GFM (autolink
literals, footnotes, strikethrough, tables, tasklists), GitHub (gemoji,
mentions, references).
There’s support for about 20 common embedded grammars in fenced code
blocks.
Embedded code (in fenced code blocks, or in ESM/expressions) is now
marked as being the correct language, which makes comments and such
work.

Closes GH-183.
Closes GH-191.
Closes GH-209.
Closes GH-221.

Co-authored-by: Remco Haszing <remcohaszing@gmail.com>
@wooorm wooorm removed the help wanted 🙏 This could use your insight or help label Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 type/bug This is a problem 🦋 type/enhancement This is great to have
Development

Successfully merging a pull request may close this issue.

4 participants