The current implementation uses node.firstChild,
maybe using node.firstElementChild is better for cases where there is a space gap between <pre> <code>?
rules.fencedCodeBlock = {
filter: function (node, options) {
return (
options.codeBlockStyle === 'fenced' &&
node.nodeName === 'PRE' &&
node.firstChild &&
node.firstChild.nodeName === 'CODE'
)
},
https://github.com/mixmark-io/turndown/blob/master/src/commonmark-rules.js