Comparing version 0.8.1 to 0.9.0
@@ -0,1 +1,13 @@ | ||
0.9.0 / 2016-08-13 | ||
================== | ||
* Markdown is now generated using the `markdown-it` package, which conforms to Commonmark standards. | ||
* Fix: Dox now recognizes ES6 template strings as strings and does not attempt to parse their contents. | ||
* Deps: added markdown-it@7.0.0 | ||
* Deps: removed marked | ||
* DevDeps: mocha@3.0.2 | ||
* DevDeps: should@11.0.0 | ||
0.8.1 / 2016-03-29 | ||
@@ -2,0 +14,0 @@ ================== |
@@ -5,31 +5,9 @@ /*! | ||
var markdown = require('marked'); | ||
var markdown = require('markdown-it')({ | ||
html: true, | ||
xhtmlOut: true, | ||
breaks: true, | ||
langPrefix: 'lang-' | ||
}); | ||
var renderer = new markdown.Renderer(); | ||
renderer.heading = function (text, level) { | ||
return '<h' + level + '>' + text + '</h' + level + '>\n'; | ||
}; | ||
renderer.paragraph = function (text) { | ||
return '<p>' + text + '</p>'; | ||
}; | ||
renderer.br = function () { | ||
return '<br />'; | ||
}; | ||
var markedOptions = { | ||
renderer: renderer | ||
, gfm: true | ||
, tables: true | ||
, breaks: true | ||
, pedantic: false | ||
, sanitize: false | ||
, smartLists: true | ||
, smartypants: false | ||
}; | ||
markdown.setOptions(markedOptions); | ||
/** | ||
@@ -132,3 +110,3 @@ * Expose api. | ||
buf += js[i]; | ||
} else if (!withinSingle && !withinMultiline && !withinEscapeChar && ('\'' == js[i] || '"' == js[i])) { | ||
} else if (!withinSingle && !withinMultiline && !withinEscapeChar && ('\'' == js[i] || '"' == js[i] || '`' == js[i])) { | ||
if(withinString) { | ||
@@ -262,8 +240,8 @@ if(js[i] == currentStringQuoteChar) { | ||
if (!raw) { | ||
description.full = markdown(description.full); | ||
description.summary = markdown(description.summary); | ||
description.body = markdown(description.body); | ||
description.full = markdown.render(description.full).trim(); | ||
description.summary = markdown.render(description.summary).trim(); | ||
description.body = markdown.render(description.body).trim(); | ||
comment.tags.forEach(function (tag) { | ||
if (tag.description) tag.description = markdown(tag.description); | ||
else tag.html = markdown(tag.string); | ||
if (tag.description) tag.description = markdown.render(tag.description).trim(); | ||
else tag.html = markdown.render(tag.string).trim(); | ||
}); | ||
@@ -734,5 +712,1 @@ } | ||
]; | ||
exports.setMarkedOptions = function(opts) { | ||
markdown.setOptions(opts); | ||
}; |
{ | ||
"name": "dox", | ||
"description": "Markdown / JSdoc documentation generator", | ||
"version": "0.8.1", | ||
"version": "0.9.0", | ||
"author": "TJ Holowaychuk <tj@vision-media.ca>", | ||
@@ -33,7 +33,7 @@ "contributors": [ | ||
"jsdoctypeparser": "^1.2.0", | ||
"marked": "~0.3.5" | ||
"markdown-it": "~7.0.0" | ||
}, | ||
"devDependencies": { | ||
"mocha": "~2.4.5", | ||
"should": "~6.0.3" | ||
"mocha": "~3.0.2", | ||
"should": "~11.0.0" | ||
}, | ||
@@ -40,0 +40,0 @@ "license": "MIT", |
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
46535
749
+ Addedmarkdown-it@~7.0.0
+ Addedargparse@1.0.10(transitive)
+ Addedentities@1.1.2(transitive)
+ Addedlinkify-it@2.2.0(transitive)
+ Addedmarkdown-it@7.0.1(transitive)
+ Addedmdurl@1.0.1(transitive)
+ Addedsprintf-js@1.0.3(transitive)
+ Addeduc.micro@1.0.6(transitive)
- Removedmarked@~0.3.5
- Removedmarked@0.3.19(transitive)