@@ -5,7 +5,10 @@ import { visit } from 'unist-util-visit';
function rewriteNode(node: Code) {
// replace node
- const data = node.data ?? (node.data = {});
+ if (node.data == null) {
+ node.data = {};
+ }
+ const data = node.data;
data.hName = 'mermaid';
data.hProperties = {
value: node.value,