-
-
Notifications
You must be signed in to change notification settings - Fork 375
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
@shikijs/markdown-it: code block is wrong when entering a non-existent language #687
Closed
3 of 5 tasks
Labels
Comments
PR welcome :) |
antfu
pushed a commit
that referenced
this issue
Jun 2, 2024
renovate bot
referenced
this issue
in r4ai/r4ai.dev
Jun 2, 2024
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [shiki](https://togithub.com/shikijs/shiki) ([source](https://togithub.com/shikijs/shiki/tree/HEAD/packages/shiki)) | [`1.6.1` -> `1.6.2`](https://renovatebot.com/diffs/npm/shiki/1.6.1/1.6.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/shiki/1.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/shiki/1.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/shiki/1.6.1/1.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/shiki/1.6.1/1.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>shikijs/shiki (shiki)</summary> ### [`v1.6.2`](https://togithub.com/shikijs/shiki/releases/tag/v1.6.2) [Compare Source](https://togithub.com/shikijs/shiki/compare/v1.6.1...v1.6.2) ##### 🚀 Features - **markdown-it**: Support default and fallback lang [#​687](https://togithub.com/shikijs/shiki/issues/687) - by [@​Only566](https://togithub.com/Only566) and **winnliu** in [https://github.com/shikijs/shiki/issues/689](https://togithub.com/shikijs/shiki/issues/689) and [https://github.com/shikijs/shiki/issues/687](https://togithub.com/shikijs/shiki/issues/687) [<samp>(3281b)</samp>](https://togithub.com/shikijs/shiki/commit/3281bf5b) ##### [View changes on GitHub](https://togithub.com/shikijs/shiki/compare/v1.6.1...v1.6.2) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/r4ai/r4ai.dev). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM3Ny44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This can be resolved if you add a md.use(await Shiki({
fallbackLanguage: 'javascript',
defaultLanguage: 'javascript',
themes: {
light: 'slack-ochin',
}
})); Just tested against latest v1.6.2 release and can confirm it falls back as expected when you have non-existent language (or a typo in the language name). |
diegohaz
referenced
this issue
in ariakit/ariakit
Jun 12, 2024
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [shiki](https://togithub.com/shikijs/shiki) ([source](https://togithub.com/shikijs/shiki/tree/HEAD/packages/shiki)) | [`1.6.1` -> `1.6.4`](https://renovatebot.com/diffs/npm/shiki/1.6.1/1.6.4) | [![age](https://developer.mend.io/api/mc/badges/age/npm/shiki/1.6.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/shiki/1.6.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/shiki/1.6.1/1.6.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/shiki/1.6.1/1.6.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>shikijs/shiki (shiki)</summary> ### [`v1.6.4`](https://togithub.com/shikijs/shiki/releases/tag/v1.6.4) [Compare Source](https://togithub.com/shikijs/shiki/compare/v1.6.3...v1.6.4) ##### 🚀 Features - Add CSS variables for markup diff tokens - by [@​SamyPesse](https://togithub.com/SamyPesse) in [https://github.com/shikijs/shiki/issues/698](https://togithub.com/shikijs/shiki/issues/698) [<samp>(84c0b)</samp>](https://togithub.com/shikijs/shiki/commit/84c0b539) - **rehype**: Support default language option - by [@​fuma-nama](https://togithub.com/fuma-nama) and [@​antfu](https://togithub.com/antfu) in [https://github.com/shikijs/shiki/issues/692](https://togithub.com/shikijs/shiki/issues/692) [<samp>(724b4)</samp>](https://togithub.com/shikijs/shiki/commit/724b410e) ##### [View changes on GitHub](https://togithub.com/shikijs/shiki/compare/v1.6.3...v1.6.4) ### [`v1.6.3`](https://togithub.com/shikijs/shiki/releases/tag/v1.6.3) [Compare Source](https://togithub.com/shikijs/shiki/compare/v1.6.2...v1.6.3) ##### 🚀 Features - **twoslash**: Add line query rendering option for twoslash renderer - by [@​hddhyq](https://togithub.com/hddhyq) and [@​antfu](https://togithub.com/antfu) in [https://github.com/shikijs/shiki/issues/695](https://togithub.com/shikijs/shiki/issues/695) [<samp>(aea25)</samp>](https://togithub.com/shikijs/shiki/commit/aea25115) ##### [View changes on GitHub](https://togithub.com/shikijs/shiki/compare/v1.6.2...v1.6.3) ### [`v1.6.2`](https://togithub.com/shikijs/shiki/releases/tag/v1.6.2) [Compare Source](https://togithub.com/shikijs/shiki/compare/v1.6.1...v1.6.2) ##### 🚀 Features - **markdown-it**: Support default and fallback lang [#​687](https://togithub.com/shikijs/shiki/issues/687) - by [@​Only566](https://togithub.com/Only566) and **winnliu** in [https://github.com/shikijs/shiki/issues/689](https://togithub.com/shikijs/shiki/issues/689) and [https://github.com/shikijs/shiki/issues/687](https://togithub.com/shikijs/shiki/issues/687) [<samp>(3281b)</samp>](https://togithub.com/shikijs/shiki/commit/3281bf5b) ##### [View changes on GitHub](https://togithub.com/shikijs/shiki/compare/v1.6.1...v1.6.2) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/ariakit/ariakit). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM5My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Validations
Describe the bug
Code block is wrong when entering a non-existent language, even if the input is not complete, an error will be reported.
Allowing configuration of a default language during initialization may be a good solution.
Reproduction
Contributes
The text was updated successfully, but these errors were encountered: