Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Conversation

antfu
Copy link
Owner

@antfu antfu commented Dec 16, 2023

This PR supports text grammar's language injection (https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide#injection-grammars). I am quite surprised it's really simple API stuff, while Shiki didn't implement it already.

Grammar injection is quite commonly used. Here is an example of Vue injecting syntax highlights for HTML:

Before:
Screenshot 2023-12-16 at 05 20 20

After:
Screenshot 2023-12-16 at 05 18 17

Copy link

netlify bot commented Dec 16, 2023

Deploy Preview for shikiji ready!

Name Link
🔨 Latest commit 5438ed2
🔍 Latest deploy log https://app.netlify.com/sites/shikiji/deploys/657d289cf3eac1000820bec6
😎 Deploy Preview https://deploy-preview-48--shikiji.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.

Copy link

codecov bot commented Dec 16, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0294ad4) 96.85% compared to head (5438ed2) 96.87%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #48      +/-   ##
==========================================
+ Coverage   96.85%   96.87%   +0.02%     
==========================================
  Files          44       44              
  Lines        3562     3587      +25     
  Branches      471      477       +6     
==========================================
+ Hits         3450     3475      +25     
  Misses        112      112              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@antfu antfu merged commit c176b23 into main Dec 16, 2023
@antfu antfu deleted the feat/injection-to branch December 16, 2023 04:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant