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

mehdown

Package Overview
Dependencies
Maintainers
1
Versions
134
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mehdown - npm Package Compare versions

Comparing version 1.4.0 to 1.5.0

9

lib/index.js

@@ -56,2 +56,5 @@ var Mehdown;

//Kickstarter
text = text.replace(/<a href="https?:\/\/(?:www\.)?(?:kickstarter\.com\/projects\/)?(\d+)\/([\w-]+).*">https?:\/\/(?:www\.)?(?:kickstarter\.com\/projects\/)?(\d+)\/([\w-]+).*<\/a>/g, Mehdown.kickstarter('$1', '$2'));
// Anchors

@@ -119,2 +122,6 @@ var anchorRegExp = new RegExp('<a[^>]*>([^<]+)</a>', 'gi');

Mehdown.kickstarter = function(kickstarterId, slug) {
return '<iframe class="kickstarter" frameborder="0" scrolling="no" src="//www.kickstarter.com/projects/' + kickstarterId + '/' + slug + '/widget/card.html"></iframe>';
};
Mehdown.vine = function(videoId) {

@@ -126,2 +133,2 @@ return '<iframe allowfullscreen class="vine" frameborder="0" src="//vine.co/v/' + videoId + '/embed/simple"></iframe>';

return '<iframe allowfullscreen class="youtube" frameborder="0" src="//www.youtube.com/embed/' + videoId + '"></iframe>';
};
};

2

package.json

@@ -13,3 +13,3 @@ {

},
"version": "1.4.0"
"version": "1.5.0"
}

@@ -12,7 +12,9 @@ mehdown

- Support for spoilers in the BBCode syntax of: [spoiler]This text will be blurred until you mouse over it[/spoiler]
- Support for strikethrough using ~~strikethrough~~ syntax
- Support for Twitter status embeds
- Support for Vimeo and YouTube video embeds
- Support for SoundCloud audio embeds
- Support for Kickstarter embeds
- Support for opening external links in a new browser tab/window
[![Build Status](https://travis-ci.org/mediocre/mehdown.png?branch=master)](https://travis-ci.org/mediocre/mehdown)

@@ -132,2 +132,10 @@ var assert = require('assert');

});
});
describe('Kickstarter URLs', function() {
it('https://www.kickstarter.com/projects/1270124222/crossing-paths-film-photography-documentary?ref=discover_rec', function() {
var body = '<p><a href="https://www.kickstarter.com/projects/1270124222/crossing-paths-film-photography-documentary?ref=discover_rec">https://www.kickstarter.com/projects/1270124222/crossing-paths-film-photography-documentary?ref=discover_rec</a></p>';
var text = mehdown.parse(body);
assert.equal(text, '<p><iframe class="kickstarter" frameborder="0" scrolling="no" src="//www.kickstarter.com/projects/1270124222/crossing-paths-film-photography-documentary/widget/card.html"></iframe></p>');
});
});
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