All: Fix the error caused by undefined isCodeBlock_ (turndown-plugin-gfm) (#11471)

pull/11490/head
Manabu Nakazawa 2024-12-10 01:57:33 +10:00 committed by GitHub
parent 56dce15537
commit e7583a1ae4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -179,7 +179,7 @@ const nodeContains = (node, types) => {
for (let i = 0; i < node.childNodes.length; i++) {
const child = node.childNodes[i];
if (types === 'code' && isCodeBlock_(child)) return true;
if (types === 'code' && isCodeBlock_ && isCodeBlock_(child)) return true;
if (types.includes(child.nodeName)) return true;
if (nodeContains(child, types)) return true;
}