d11 theme
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

14 lines
409 B

module.exports = formatCodeAsIndented
function formatCodeAsIndented(node, context) {
return (
!context.options.fences &&
node.value &&
// If there’s no info…
!node.lang &&
// And there’s a non-whitespace character…
/[^ \r\n]/.test(node.value) &&
// And the value doesn’t start or end in a blank…
!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(node.value)
)
}