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(highlight): preload common languages #1278

Merged
merged 2 commits into from Jun 22, 2022
Merged

Conversation

farnabaz
Copy link
Member

πŸ”— Linked issue

resolves #1265

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Treat content.highlight.preload and additional languages and always load 'json', 'js', 'ts', 'css'.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@netlify
Copy link

netlify bot commented Jun 22, 2022

βœ… Deploy Preview for nuxt-content ready!

Name Link
πŸ”¨ Latest commit 3367248
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt-content/deploys/62b2e2ac5b43d3000994d53d
😎 Deploy Preview https://deploy-preview-1278--nuxt-content.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 settings.

@Atinux
Copy link
Member

Atinux commented Jun 22, 2022

Shall we also load Λ‹diff`?

@farnabaz farnabaz mentioned this pull request Jun 22, 2022
@Atinux
Copy link
Member

Atinux commented Jun 22, 2022

Also, why do we have to list all preload, cannot we load it on demand?

@farnabaz
Copy link
Member Author

Also, why do we have to list all preload, cannot we load it on demand?

We are dynamically import new languages but Shiki has issue with dynamic loading and it raise error. The issue reported quite while ago but still open. shikijs/shiki#257

@farnabaz farnabaz changed the title fix(highlight): always preload js, ts and css languages fix(highlight): preload common languages Jun 22, 2022
@farnabaz farnabaz merged commit 863a36f into main Jun 22, 2022
@farnabaz farnabaz deleted the fix/highlight-preload branch June 22, 2022 11:21
@farnabaz farnabaz mentioned this pull request Aug 12, 2022
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.

Support more code type
2 participants