From 4971baefec0af8fd4a6b2856c09285ed30102074 Mon Sep 17 00:00:00 2001 From: Ninjex Date: Thu, 28 Jul 2016 05:52:18 -0500 Subject: [PATCH] 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) --- js/plugins.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/plugins.js b/js/plugins.js index be75934..d6b4ff9 100644 --- a/js/plugins.js +++ b/js/plugins.js @@ -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];