Skip to content

fix(highlight): preload common languages - #1278

Merged
farnabaz merged 2 commits into
mainfrom
fix/highlight-preload
Jun 22, 2022
Merged

farnabaz merged 2 commits into
mainfrom
fix/highlight-preload

Conversation

@farnabaz

Copy link
Copy Markdown
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

netlify Bot commented Jun 22, 2022 •

Copy link
Copy Markdown

✅ 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

atinux commented Jun 22, 2022

Copy link
Copy Markdown
Member

Shall we also load ˋdiff`?

@farnabaz farnabaz mentioned this pull request Jun 22, 2022
@atinux

atinux commented Jun 22, 2022

Copy link
Copy Markdown
Member

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

@farnabaz

Copy link
Copy Markdown
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