Comparing version 0.2.0 to 0.2.1
{ | ||
"name": "builddocs", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Build documentation files from getdocs-commented source code", | ||
@@ -5,0 +5,0 @@ "main": "src/builddocs.js", |
@@ -50,2 +50,5 @@ # builddocs | ||
* **`markdownOptions`**`: ?Object` A set of options to pass through | ||
to [markdown-it](https://github.com/markdown-it/markdown-it). | ||
The second parameter, `data`, can be used if the data for the module | ||
@@ -52,0 +55,0 @@ has already been read. By default, `build` will read it. |
var fs = require("fs") | ||
var Mold = require("mold-template") | ||
var markdown = (require("markdown-it")({html: true})).use(require("markdown-it-deflist")) | ||
var read = exports.read = require("./read").read | ||
@@ -13,2 +11,6 @@ var builtins = require("./builtins") | ||
var mdOptions = {html: true} | ||
if (config.markdownOptions) for (var prop in config.markdownOptions) mdOptions[prop] = config.markdownOptions[prop] | ||
var markdown = require("markdown-it")(mdOptions).use(require("markdown-it-deflist")) | ||
var placed = Object.create(null) | ||
@@ -24,3 +26,3 @@ var doc = markdown.render(fs.readFileSync(config.main, "utf8").replace(/(^|\n)@(\w+)(?=$|\n)/g, function(_, before, name, after) { | ||
var mold = loadTemplates(config, data) | ||
var mold = loadTemplates(markdown, config, data) | ||
@@ -39,3 +41,3 @@ return doc.replace(/<div data-item="([^"]+)"><\/div>/g, function(_, name) { | ||
function loadTemplates(config, data) { | ||
function loadTemplates(markdown, config, data) { | ||
var mold = new Mold(moldEnv(config, data)) | ||
@@ -42,0 +44,0 @@ mold.defs.markdown = function(text) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26412
286
81