Skip to content

Commit

Permalink
fix: code box compiler bug with python code
Browse files Browse the repository at this point in the history
  • Loading branch information
codeacme17 committed Apr 2, 2023
1 parent 7cb629e commit 5bfab10
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion package/utils/stream-data-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ async function streamDataHander(content) {
if (isCodeBlock && content.includes("``")) shadowEnd = true

// code block END
if (shadowEnd && content.includes("`\n")) {
if (
(shadowEnd && content.includes("`\n")) ||
(isCodeBlock && content.includes("```"))
) {
content = "\n"
await deleteLines(codeRows)
stream.write(codeBoxer.boxify(codeContent.toString() + "`"))
Expand Down Expand Up @@ -56,3 +59,6 @@ function deleteLines(end) {
}

module.exports = streamDataHander

// can you give me a sum func in py?
// can you give me a debounce fn in js?

0 comments on commit 5bfab10

Please sign in to comment.