Update plugin.js (#795)

The Asciinema cast plugin regex was faulty. Casts can have /[a-z]/ characters, not only digits /\d)
Here is a test cast for you to run: https://asciinema.org/a/29qfl1dwsgd25o91nfv3dvvbn

(squashed two commits --@lorenzhs)
This commit is contained in:
Ninjex 2016-07-28 05:52:18 -05:00 committed by Lorenz Hübschle-Schneider
parent 6149aa8a07
commit 4971baefec
1 changed files with 1 additions and 1 deletions

View File

@ -400,7 +400,7 @@ plugins.factory('userPlugins', function() {
* Asciinema plugin
*/
var asciinemaPlugin = new UrlPlugin('ascii cast', function(url) {
var regexp = /^https?:\/\/(?:www\.)?asciinema.org\/a\/(\d+)/i,
var regexp = /^https?:\/\/(?:www\.)?asciinema.org\/a\/([0-9a-z]+)/i,
match = url.match(regexp);
if (match) {
var id = match[1];