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

markdown-magic

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-magic - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

4

examples/generate-readme.js

@@ -25,3 +25,5 @@ const fs = require('fs')

/* Match AUTO-GENERATED-CONTENT (pluginExample) */
pluginExample: require('./plugin-example')({ addNewLine: true })
pluginExample: require('./plugin-example')({ addNewLine: true }),
// count: require('markdown-magic-wordcount'),
// github: require('markdown-magic-github-contributors')
}

@@ -28,0 +30,0 @@ }

@@ -9,5 +9,3 @@ /*

const openingTag = getOpeningTags(block, config)
// console.log(openingTag)
const closingTag = getClosingTags(block, config)
// console.log(closingTag)

@@ -25,6 +23,11 @@ if (!openingTag.transform) {

const cmdOptions = openingTag.transform.cmdOptions
// check if command exists
if (cmd && config.transforms && config.transforms[cmd]) {
const filteredContent = config.transforms[cmd](originalContent, cmdOptions, config)
newContent = filteredContent
let updatedContent = config.transforms[cmd](originalContent, cmdOptions, config)
if (typeof updatedContent === 'function') {
// if plugin has no options defined, invoke it with defaults
updatedContent = updatedContent(originalContent, cmdOptions, config)
}
newContent = updatedContent
if (!newContent) {

@@ -31,0 +34,0 @@ console.log(`COMMAND '${cmd}' is returning undefined value. using original content instead. Make sure you return a value from your transform`)

{
"name": "markdown-magic",
"version": "0.1.4",
"version": "0.1.5",
"description": "Automatically update markdown files with content from external sources",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -135,2 +135,3 @@ # Markdown Magic

* [wordcount](https://github.com/DavidWells/markdown-magic-wordcount/) - Add wordcount to markdown files
* [github-contributors](https://github.com/DavidWells/markdown-magic-github-contributors) - List out the contributors of a given repository

@@ -174,3 +175,5 @@ ## Custom Transforms

/* Match AUTO-GENERATED-CONTENT (pluginExample) */
pluginExample: require('./plugin-example')({ addNewLine: true })
pluginExample: require('./plugin-example')({ addNewLine: true }),
// count: require('markdown-magic-wordcount'),
// github: require('markdown-magic-github-contributors')
}

@@ -177,0 +180,0 @@ }

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