From 61078d3c16fe29f26bd01ef57a0acd24427b162a Mon Sep 17 00:00:00 2001 From: j Date: Mon, 9 Nov 2009 00:32:02 +0100 Subject: [PATCH] use global replace --- index.html | 2 +- jquery.srt.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 590ed08..075f146 100644 --- a/index.html +++ b/index.html @@ -75,7 +75,7 @@ if no data-srt is provided, the contents of the div is parsed as srt.

-
content
+
diff --git a/jquery.srt.js b/jquery.srt.js index 0184732..3919f19 100644 --- a/jquery.srt.js +++ b/jquery.srt.js @@ -34,7 +34,7 @@ $(document).ready(function() { var videoId = subtitleElement.attr('data-video'); var srt = subtitleElement.text(); subtitleElement.text(''); - srt = srt.replace('\r\n|\r|\n', '\n') + srt = srt.replace(/\r\n|\r|\n/g, '\n') var subtitles = {}; srt = strip(srt);