Skip to content

Commit 17774dd

Browse files
committed
Fix inverted language check, #2956
1 parent 0e34434 commit 17774dd

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ title: Changelog
88

99
### Bug Fixes
1010

11+
- Attempting to highlight a supported language which is not enabled is now a warning, not an error, #2956.
12+
13+
### Bug Fixes
14+
1115
- References to type aliases defined as mapped types will now correctly create a reference to the type alias, #2954.
1216
- `ignoredHighlightLanguages` can now be used to prevent warnings for codeblocks containing languages
1317
which are supported by Shiki but are not loaded, #2956.

src/lib/output/themes/MarkedPlugin.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ export class MarkedPlugin extends ContextAwareRendererComponent {
8787
public getHighlighted(text: string, lang?: string): string {
8888
lang = lang || "typescript";
8989
lang = lang.toLowerCase();
90-
if (!isSupportedLanguage(lang)) {
91-
if (isLoadedLanguage(lang)) {
90+
if (!isLoadedLanguage(lang)) {
91+
if (isSupportedLanguage(lang)) {
9292
this.application.logger.warn(
9393
i18n.unloaded_language_0_not_highlighted_in_comment_for_1(
9494
lang,

0 commit comments

Comments
 (0)