Permalink
Browse files

Added allURLs

  • Loading branch information...
1 parent 74e15b8 commit e0d062c68143ce77ecb5ff017ecdc68f3532b850 amix committed Apr 21, 2014
Showing with 9 additions and 1 deletion.
  1. +4 −0 lib/media-parser.js
  2. +1 −1 package.json
  3. +4 −0 src/media_parser.coffee
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -3,7 +3,7 @@
"description": "Simple JavaScript library to ease integration with media and oEmbed.",
"keywords": ["oembed", "media", "thumbnails", "preview"],
"author": "amix",
- "version": "1.4.0",
+ "version": "1.4.1",
"dependencies": {},
"repository": "https://github.com/Doist/media-parser",
"licenses": [{
View
@@ -37,4 +37,8 @@ MediaParser = {
pattern = MediaServices.getProvidersPattern()
return content.match(pattern) or []
+ url_pattern: /https?:\/\/[^\s]+/gi
+ allURLs: (content) ->
+ return content.match(MediaParser.url_pattern) or []
+
}

0 comments on commit e0d062c

Please sign in to comment.