mdx-js / mdx-analyzer

MDX extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx
MIT License
347 stars 21 forks source link

Highlighting regression in VSCode 1.92.0 #464

Closed ssalbdivad closed 3 months ago

ssalbdivad commented 3 months ago

Initial checklist

Affected packages and versions

v1.8.9

Link to runnable example

No response

Steps to reproduce

As of VSCode 1.92.0, I see the following when viewing an Astro .mdx file that previously was correctly highlighted:

Screenshot 2024-08-04 140820

Here is the content of that file for reference:

---
title: ArkType
description: TypeScript's 1:1 validator, optimized from editor to runtime
template: splash
hero:
  title: ArkType
  tagline: TypeScript's 1:1 validator, optimized from editor to runtime
  image:
    alt: A serene ark, sailing to runtime
    file: ../../assets/splash.png
  actions:
    - text: Set sail
      link: /intro/setup/
      icon: right-arrow
      variant: primary
---

import {
    Card,
    CardGrid,
    LinkCard,
    TabItem,
    Tabs
} from "@astrojs/starlight/components"
import {
    RuntimeBenchmarksGraph,
    TypeBenchmarksGraph
} from "../../components/BenchmarksGraph.tsx"
import Code from "../../components/Code.astro"
import { HeroBackdrop } from "../../components/HeroBackdrop.tsx"
import betterErrors from "./betterErrors.twoslash.js?raw"
import clarityAndConcision from "./clarityAndConcision.twoslash.js?raw"
import deepIntrospectability from "./deepIntrospectability.twoslash.js?raw"
import intrinsicOptimization from "./intrinsicOptimization.twoslash.js?raw"
import unparalleledDx from "./unparalleledDx.twoslash.js?raw"

<div class="not-content">
    <HeroBackdrop client:only="react" />
</div>

## What awaits

<CardGrid stagger>
    <Card title="Unparalleled DX" icon="seti:tsconfig">
        Type syntax you already know with safety and completions unlike anything
        you've ever seen
        <Code code={unparalleledDx} />
    </Card>
    <Card title="Faster... everything" icon="rocket">
        100x faster than Zod at runtime with editor performance that will remind you
        how autocomplete is supposed to feel
        <Tabs>
            <TabItem label="Runtime">
                <RuntimeBenchmarksGraph />
            </TabItem>
            <TabItem label="Editor">
                <TypeBenchmarksGraph />
            </TabItem>
        </Tabs>
    </Card>
    <Card title="Clarity and Concision" icon="comment-alt">
        Definitions are half as long, type errors are twice as readable, and hovers
        tell you just what really matters
        <Code code={clarityAndConcision} />
    </Card>
    <Card title="Better Errors" icon="error">
        Deeply customizable messages with great defaults
        <Code code={betterErrors} />
    </Card>
    <Card title="Deep Introspectability" icon="seti:code-search">
        ArkType uses set theory to understand and expose the relationships between
        your types at runtime the way TypeScript does at compile time
        <Code code={deepIntrospectability} />
    </Card>
    <Card title="Intrinsic Optimization" icon="seti:smarty">
        Every schema is internally normalized and reduced to its purest and fastest
        representation
        <Code code={intrinsicOptimization} />
    </Card>
    {/* <Card title="Portable" icon="seti:json">
        Most definitions are just objects and strings- take them across the stack or
        even outside JS altogether
    </Card> */}
</CardGrid>

<LinkCard
    title="Doc up"
    description="Everything you need to know from installation to integration"
    href="/intro/setup"
/>

According to a member of the VSCode team, there are some other extensions that need to update their highlighting rules after 1.92.0, so I thought perhaps the issue was resolvable from here.

Expected behavior

Correct highlighting

Actual behavior

Broken highlighting

Runtime

No response

Package manager

No response

OS

No response

Build and bundle tools

No response

remcohaszing commented 3 months ago

Duplicate of https://github.com/wooorm/markdown-tm-language/issues/10

github-actions[bot] commented 3 months ago

Hi! This was closed. Team: If this was fixed, please add phase/solved. Otherwise, please add one of the no/* labels.

github-actions[bot] commented 3 months ago

Hi! Thanks for taking the time to contribute!

Because we treat issues as our backlog, we close duplicates to focus our work and not have to touch the same chunk of code for the same reason multiple times. This is also why we may mark something as duplicate that isn’t an exact duplicate but is closely related.

Thanks, — bb

ssalbdivad commented 3 months ago

@remcohaszing Whoops sorry, should have checked closed issues 🤦