From dd3b6e7273ee3cdaa5776e0c9c3b2845b01ae4cc Mon Sep 17 00:00:00 2001 From: NGPixel Date: Tue, 21 Mar 2017 18:59:43 -0400 Subject: [PATCH] Fixed RegExp encapsulation bug --- libs/markdown.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/markdown.js b/libs/markdown.js index 7d9dd28f..9ceec7ee 100644 --- a/libs/markdown.js +++ b/libs/markdown.js @@ -62,17 +62,17 @@ mkdown.renderer.rules.emoji = function (token, idx) { const videoRules = [ { selector: 'a.youtube', - regexp: new RegExp(/(?:(?:youtu\.be\/|v\/|vi\/|u\/\w\/|embed\/)|(?:(?:watch)?\?v(?:i)?=|&v(?:i)?=))([^#&?]*).*/, 'i'), + regexp: new RegExp(/(?:(?:youtu\.be\/|v\/|vi\/|u\/\w\/|embed\/)|(?:(?:watch)?\?v(?:i)?=|&v(?:i)?=))([^#&?]*).*/i), output: '' }, { selector: 'a.vimeo', - regexp: new RegExp(/vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/(?:[^/]*)\/videos\/|album\/(?:\d+)\/video\/|)(\d+)(?:$|\/|\?)/, 'i'), + regexp: new RegExp(/vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/(?:[^/]*)\/videos\/|album\/(?:\d+)\/video\/|)(\d+)(?:$|\/|\?)/i), output: '' }, { selector: 'a.dailymotion', - regexp: new RegExp(/(?:dailymotion\.com(?:\/embed)?(?:\/video|\/hub)|dai\.ly)\/([0-9a-z]+)(?:[-_0-9a-zA-Z]+(?:#video=)?([a-z0-9]+)?)?/, 'i'), + regexp: new RegExp(/(?:dailymotion\.com(?:\/embed)?(?:\/video|\/hub)|dai\.ly)\/([0-9a-z]+)(?:[-_0-9a-zA-Z]+(?:#video=)?([a-z0-9]+)?)?/i), output: '' }, {