Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix streaming code
  • Loading branch information
pomber committed Jun 25, 2023
commit d3fa5fedb29be6f0cee6c5c0f4be1dc214819b3b
6 changes: 4 additions & 2 deletions packages/mdx/src/chat/highlight-code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ export function highlightFile(
}
}

const text = getStreamingCode(
const text = fileInfo.open ? getStreamingCode(
fileInfo.text,
prevFile?.text
)
) : fileInfo.text


const result =
isLangSupported(fileInfo.lang) &&
isLangLoaded(fileInfo.lang)
Expand Down