Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dmd

Package Overview
Dependencies
Maintainers
1
Versions
125
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dmd - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

helpers/block/collection/identifiers.js

18

helpers/link-to.js
var a = require("array-tools"),
url = require('url'),
util = require("util");

@@ -23,3 +24,4 @@

} else {
var linked = a.findWhere(options.data.root, { longname: longname });
var linked = a.findWhere(options.data.root, { longname: longname }),
mask;
if (linked){

@@ -29,4 +31,16 @@ linked.isConstructor = false;

var linkText = fullName ? fullName.replace(longname, linked.name) : linked.name;
return util.format("[%s](#%s)", linkText, handlebars.helpers.anchorName.call(linked, options));
mask = options.monospace ? "`[%s](#%s)`" : "[%s](#%s)";
return util.format(mask, linkText, handlebars.helpers.anchorName.call(linked, options));
} else {
if (url.parse(fullName || longname).protocol) {
switch (options.style) {
case 'code':
mask = '`[%s](%s)`';
break;
case 'plain':
default:
mask = '[%s](%s)';
}
return util.format(mask, options.caption || fullName || longname, fullName || longname);
}
return "`" + (fullName || longname) + "`";

@@ -33,0 +47,0 @@ }

2

package.json
{
"name": "dmd",
"author": "Lloyd Brookes <75pound@gmail.com>",
"version": "0.2.4",
"version": "0.2.5",
"description": "dmd",

@@ -6,0 +6,0 @@ "repository": "https://github.com/75lb/dmd.git",

@@ -34,3 +34,3 @@ [

{
"description": "the prototype instance property",
"description": "the prototype {@link http://zombo.com|instance} property",
"name": "files",

@@ -70,2 +70,2 @@ "longname": "module:file-set#files",

}
]
]

@@ -37,4 +37,14 @@ var test = require("tape");

test("linkify", function (t) {
t.plan(1);
fs.createReadStream("test/fixture/class.json").pipe(dmd()).on("readable", function () {
var md = this.read();
t.ok(md.toString().indexOf('[instance](http://zombo.com)') >= 0);
});
});
test("partials");
test("headers");
test("plugins");
test("plugins");

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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