Skip to content

fix(highlight): preload common languages - #1278

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

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

netlifyBot commented Jun 22, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt-content ready!

NameLink
🔨 Latest commit3367248
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt-content/deploys/62b2e2ac5b43d3000994d53d
😎 Deploy Previewhttps://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
Copy Markdown
Member

Shall we also load ˋdiff`?

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

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
MemberAuthor

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

@farnabazfarnabaz changed the title fix(highlight): always preload js, ts and css languagesfix(highlight): preload common languagesJun 22, 2022
@farnabaz
farnabaz merged commit 863a36f into mainJun 22, 2022
@farnabaz
farnabaz deleted the fix/highlight-preload branch June 22, 2022 11:21
@farnabazfarnabaz mentioned this pull request Aug 12, 2022
farnabaz added a commit that referenced this pull request Sep 7, 2022
Sign up for freeto 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

@farnabaz@atinux