Socket
Socket
Sign inDemoInstall

dox

Package Overview
Dependencies
Maintainers
3
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dox - npm Package Compare versions

Comparing version 0.8.1 to 0.9.0

12

History.md

@@ -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 @@ ==================

50

lib/dox.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc