🐛 fix language undefined bug
This commit is contained in:
parent
4f7b99a465
commit
9007b8fed3
1 changed files with 1 additions and 1 deletions
|
|
@ -64,7 +64,7 @@ const commonTerminalCommands = [
|
|||
function isTerminalCodeBlock(language: string | undefined, text: string) {
|
||||
return (
|
||||
terminalLanguages.includes(language) ||
|
||||
(language.length === 0 &&
|
||||
(language?.length === 0 &&
|
||||
(text.trim().split("\n").length === 1 ||
|
||||
commonTerminalCommands.some((c) => text.trim().startsWith(c))))
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue