Skip to content

Commit

Permalink
always use strict inequality !==
Browse files Browse the repository at this point in the history
  • Loading branch information
liangwang committed Mar 24, 2024
1 parent 64ece4f commit 18ded33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/turndown/src/commonmark-rules.js
Expand Up @@ -476,7 +476,7 @@ rules.code = {

content = content.replace(/\r?\n|\r/g, '\n')
// if code is multiline and in codeBlock, just return it, codeBlock well add fence(default is ```)
if (content.indexOf('\n') != -1 && node.parentNode && isCodeBlock(node.parentNode)){
if (content.indexOf('\n') !== -1 && node.parentNode && isCodeBlock(node.parentNode)){
return content
}

Expand Down

0 comments on commit 18ded33

Please sign in to comment.