New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

functional-docs

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

functional-docs - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

2

package.json
{
"name": "functional-docs",
"version": "0.0.5",
"version": "0.0.6",
"author": "Garen Torikian",

@@ -5,0 +5,0 @@ "keywords": ["documentation", "docs", "testing", "html"],

@@ -1,2 +0,1 @@

var util = require("util");
var fs = require('fs');

@@ -6,3 +5,2 @@ var path = require('path');

var jsdom = require('jsdom');
var async = require('async');

@@ -17,3 +15,3 @@ exports.checkMissingImage = function(filename, doc, callback) {

if (src === undefined || src.length == 0) {
if (src === undefined || src.length === 0) {
errors.push(printMessage("Missing src attribute", filename));//, l, lines[l]));

@@ -79,5 +77,16 @@ }

else { // if the hash file doesn't exist, this is an internal hash (i.e. "href='#blah'")
if (doc.getElementById(hashId) == null) {
// get attributes "name"
errors.push(printMessage(filename + " has an incorrect internal hash to '#" + hashId + "'", filename));
if (doc.getElementById(hashId) === null) {
// checking the name attribute; I weep to do this twice
var foundName = false;
var links = doc.getElementsByTagName('a');
for(var i = 0; i< links.length; i++){
var n = links[i].getAttribute("name");
if (n && n == hashId) {
found = true;
break;
}
}
if (!found)
errors.push(printMessage(filename + " has an incorrect internal hash to '#" + hashId + "'", filename));
}

@@ -105,5 +114,5 @@ else {

var refDirName = href.substr(0, lastSlashPos);
refFileName = href.substr(lastSlashPos + 1);
var refFileName = href.substr(lastSlashPos + 1);
if (refDirName.length == 0 || lastSlashPos < 0) {
if (refDirName.length === 0 || lastSlashPos < 0) {
refDirName = path.dirname(filepath);

@@ -128,2 +137,2 @@ }

return msg + " in " + path.basename(filename);// + " around line " + line + ": " + string;
};
}
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