How to use the markdown-it.enable function in markdown-it

To help you get started, we’ve selected a few markdown-it examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mtmacdonald / docgen / source / docgen.js View on Github external
var rsvp = require('rsvp');
var fs = require('fs-extra');
var path = require('path');
var cheerio = require('cheerio');
var markdown = require('markdown-it')('commonmark').enable('table');;
var moment = require('moment');
var childProcess = require("child_process");
var schemaValidator = require("z-schema");
var chalk = require('chalk');
var spawnArgs = require('spawn-args');
var cliSpinner = require('cli-spinner').Spinner;
var imageSizeOf = require('image-size');

//Allow CommonMark links that use other protocols, such as file:///
//The markdown-it implementation is more restrictive than the CommonMark spec
//See https://github.com/markdown-it/markdown-it/issues/108
markdown.validateLink = function () { return true; } 

/**
* DocGen class
*/