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

feat(rehype): Support fallbackLanguage on lazy mode #912

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

fuma-nama
Copy link
Contributor

@fuma-nama fuma-nama commented Jan 30, 2025

Description

Support fallbackLanguage when lazy is set to true, you can consider this as a successor of #821.

Since highlighter.loadLanguage throws error on languages that's not included in the bundle, we can use it to detect whether fallback is needed.

Linked Issues

N/A

Additional context

Unit test added

Copy link

netlify bot commented Jan 30, 2025

Deploy Preview for shiki-next ready!

Name Link
🔨 Latest commit 93a5cf0
🔍 Latest deploy log https://app.netlify.com/sites/shiki-next/deploys/679b2d63a18e42000832db1d
😎 Deploy Preview https://deploy-preview-912--shiki-next.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

netlify bot commented Jan 30, 2025

Deploy Preview for shiki-matsu ready!

Name Link
🔨 Latest commit 93a5cf0
🔍 Latest deploy log https://app.netlify.com/sites/shiki-matsu/deploys/679b2d63bece100008fc2fed
😎 Deploy Preview https://deploy-preview-912--shiki-matsu.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 Jan 30, 2025

Codecov Report

Attention: Patch coverage is 87.50000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 94.23%. Comparing base (c55865f) to head (93a5cf0).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/rehype/src/core.ts 87.50% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #912      +/-   ##
==========================================
- Coverage   94.27%   94.23%   -0.04%     
==========================================
  Files          91       91              
  Lines        7471     7481      +10     
  Branches     1535     1539       +4     
==========================================
+ Hits         7043     7050       +7     
- Misses        419      422       +3     
  Partials        9        9              

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

@antfu antfu merged commit 6a85269 into shikijs:main Jan 30, 2025
12 of 14 checks passed
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