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

markdown-toolset

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-toolset - npm Package Compare versions

Comparing version 0.1.1 to 0.4.0

tests/image.spec.js

2

bower.json
{
"name": "markdown-toolset",
"main": "dist/markdown-toolset.js",
"version": "0.1.1",
"version": "0.4.0",
"description": "Tiny module for markdown editing.",

@@ -6,0 +6,0 @@ "homepage": "https://github.com/Deadarius/markdown-toolset",

@@ -18,3 +18,3 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

module.exports = {
var mt = {
bold: function (text) {

@@ -62,6 +62,6 @@ return surroundOrUnsurround(text, '**')

var fnName = 'h' + hashes
var fn = this[fnName]
var fn = mt[fnName]
return fn(textUnheaded)
} else {
return this.h1(text)
return mt.h1(text)
}

@@ -93,5 +93,13 @@ },

return lines.join('\n')
},
link: function (url, text) {
return '[' + (text || '') + '](' + url + ')'
},
image: function (url, text) {
return '!' + mt.link(url, text)
}
}
module.exports = mt
},{"./prefix-or-unprefix":3,"./surround-or-unsurround":4}],3:[function(require,module,exports){

@@ -98,0 +106,0 @@ module.exports = function prefixOrUnprefix (text, prefix) {

@@ -77,2 +77,8 @@ var surroundOrUnsurround = require('./surround-or-unsurround')

return lines.join('\n')
},
link: function (url, text) {
return '[' + (text || '') + '](' + url + ')'
},
image: function (url, text) {
return '!' + mt.link(url, text)
}

@@ -79,0 +85,0 @@ }

{
"name": "markdown-toolset",
"version": "0.1.1",
"version": "0.4.0",
"description": "Tiny module for markdown editing.",

@@ -31,3 +31,3 @@ "main": "index.js",

},
"standard":{
"standard": {
"ignore": "dist"

@@ -34,0 +34,0 @@ },

@@ -36,25 +36,30 @@ # Markdown Toolset

mt.italic('text') //*text*
mt.bold('text') //**text**
mt.h1('text') //# text
mt.h2('text') //## text
mt.h3('text') //### text
mt.h4('text') //#### text
mt.h5('text') //##### text
mt.h6('text') //###### text
mt.italic('text') //*text*
mt.bold('text') //**text**
mt.h1('text') //# text
mt.h2('text') //## text
mt.h3('text') //### text
mt.h4('text') //#### text
mt.h5('text') //##### text
mt.h6('text') //###### text
mt.header('### text') //#### text - returns next header or cycles back to text
mt.link('http://example.com', 'text') //[text](http://example.com)
mt.image('http://example.com/image.png', 'text') //![text](http://example.com/image.png)
mt.ul('line1\nline2\nline3') //* line1
//* line2
//* line3
mt.ol('line1\nline2\nline3') //1. line1
//2. line2
//3. line3
mt.code('line1\nline2\nline3') // line1
// line2
// line3
mt.ul('line1\nline2\nline3') //* line1
//* line2
//* line3
mt.hr() //***
//
mt.ol('line1\nline2\nline3') //1. line1
//2. line2
//3. line3
mt.code('line1\nline2\nline3') // line1
// line2
// line3
mt.hr() //***
//
```

@@ -61,0 +66,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