example
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||
import marked from '../tests/_marked.js'; import { readFileSync } from 'fs'; import TerminalRenderer from '../index.js'; import { dirname } from 'path'; import { fileURLToPath } from 'url'; // Example showing usage information from a CLI tool. marked.setOptions({ // Define custom renderer renderer: new TerminalRenderer() }); // Show the parsed data console.log( marked( readFileSync( dirname(fileURLToPath(import.meta.url)) + '/../README.md' ).toString() ) );