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

fix(grammer): nesting andnative markdown highlighting in MDC grammer #102

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

farnabaz
Copy link

@farnabaz farnabaz commented Nov 14, 2024

Change MDC grammer to allow standalone usage. The current state is designed to inject into markdown grammar which is suitable for standalone use like Shiki

Before:
Screenshot 2024-11-14 at 01 07 30

After:
Screenshot 2024-11-14 at 01 09 38

Here is the markdown that you can test with:

---
data: value
---

::Grid{cols="3"}
  :::GridCard{#html-id .some-class}
  ...
  :::

  :::GridCard{#html-id2 .some-class}
  ...
  :::

  :::GridCard{#html-id3 .some-class}
  ---
  icon: information
  ---
  Use Vue components in Markdown files, with props, slots
  and nested components with our improved Markdown syntax.

  #header

  Markdown with Components
  :::
::

Copy link

netlify bot commented Nov 14, 2024

Deploy Preview for textmate-grammars-themes ready!

Name Link
🔨 Latest commit 668f18c
🔍 Latest deploy log https://app.netlify.com/sites/textmate-grammars-themes/deploys/6735ccacf7185600088195bd
😎 Deploy Preview https://deploy-preview-102--textmate-grammars-themes.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@antfu
Copy link
Member

antfu commented Nov 14, 2024

Did you change the source? This is a script that fetch upstream grammar and automatically updates on daily-basis

@farnabaz
Copy link
Author

I didn't notice that grammar is updating automatically.

But the thing is we can't use MDC grammar from vscode extension, because as I said, it is designed to inject into VSCode markdown language, and using it as standalone grammar will lead to highlight issues.

I will update vscode-mdc, add another grammar for standalone usage, and update this PR

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

Successfully merging this pull request may close these issues.

2 participants