fix: use Shiki's isSpecialLang
to allow ansi
codeblocks
#10540
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, there was a hardcoded if condition which detected unknown languages and replaced them with
plaintext
for codeblocks. Hardcoding this value makes it impossible to use Shiki'sansi
feature. Changed the code from using the hard coded value over to using a library function, fixing #10539.Changes
ansi
language (as well astxt
,text
, etc.)Before and after photos:
Testing
This change was tested by modifying the blog example locally (not tracked). Unit tests may not be necessary for change.
Docs
As this is a bug fix that only enables wrongly suppressed behavior, no documentation needs to be altered.