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

markdown-it-include

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-it-include - npm Package Compare versions

Comparing version 0.0.2 to 1.0.0

9

index.js

@@ -9,5 +9,4 @@ 'use strict';

module.exports = function include_plugin(md, basedir) {
var filesProcessed;
function _replaceIncludeByContent(src, rootdir, parentFilePath) {
function _replaceIncludeByContent(src, rootdir, parentFilePath, filesProcessed) {
filesProcessed = filesProcessed ? filesProcessed.slice() : []; // making a copy
var cap, filePath, mdSrc, indexOfCircularRef;

@@ -29,3 +28,4 @@

// replace include by file content
mdSrc = _replaceIncludeByContent(fs.readFileSync(filePath, 'utf8'), path.dirname(filePath), filePath);
mdSrc = fs.readFileSync(filePath, 'utf8');
mdSrc = _replaceIncludeByContent(mdSrc, path.dirname(filePath), filePath, filesProcessed);
src = src.slice(0, cap.index) + mdSrc + src.slice(cap.index + cap[0].length, src.length);

@@ -38,3 +38,2 @@ }

var rootdir = basedir || '.';
filesProcessed = [];
state.src = _replaceIncludeByContent(state.src, rootdir);

@@ -41,0 +40,0 @@ }

{
"name": "markdown-it-include",
"version": "0.0.2",
"version": "1.0.0",
"description": "Markdown-it plugin which adds the ability to include markdown fragment files.",

@@ -24,18 +24,18 @@ "keywords": [

"author": {
"name" : "Camel Aissani",
"email" : "camel.aissani@gmail.com",
"url" : "https://nuageprive.fr/"
"name": "Camel Aissani",
"email": "camel.aissani@gmail.com",
"url": "https://nuageprive.fr/"
},
"devDependencies": {
"eslint": "0.10.2",
"eslint-plugin-nodeca": "^1.0.0",
"browserify": "*",
"browserify": "^14.5.0",
"chai": "^4.1.2",
"coveralls": "^2.11.2",
"uglify-js": "*",
"istanbul": "*",
"chai": "*",
"mocha": "*",
"markdown-it-testgen": "~0.1.0",
"markdown-it": "markdown-it/markdown-it"
"eslint": "^0.10.2",
"eslint-plugin-nodeca": "^1.0.3",
"istanbul": "^0.4.5",
"markdown-it": "^8.4.0",
"markdown-it-testgen": "^0.1.4",
"mocha": "^4.0.1",
"uglify-js": "^3.2.2"
}
}
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