Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public toMarkdown() {
this.applyFrontMatterData()
let lastRoot = this.tree
this.middlewares.forEach(fn => {
lastRoot = fn(lastRoot)
})
this.compiler = new Compiler(lastRoot, { entities: false, gfm: true })
attachFrontmatterCompiler(this.compiler)
return this.compiler.compile()
}
}
export function render(node: T): string {
const compiler = new Compiler(node);
return compiler.compile();
}