import { visit } from 'unist-util-visit'; export default function rehypeEscape(): any { return function (node: any): any { return visit(node, 'element', (el) => { if (el.tagName === 'code' || el.tagName === 'pre') { el.properties['is:raw'] = true; // Visit all raw children and escape HTML tags to prevent Markdown code // like "This is a `