Closed Only566 closed 1 month ago
PR welcome :)
This can be resolved if you add a fallbackLanguage
to the options like so:
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).
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