[gnome-subtitles] Fix format and input regex for Panimator subtitle format.
- From: Pedro Daniel da Rocha Melo e Castro <pcastro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-subtitles] Fix format and input regex for Panimator subtitle format.
- Date: Sun, 18 Sep 2011 21:05:30 +0000 (UTC)
commit 5232d65126ab5fe7dd5f4ff3f0f11e254dbc445c
Author: Pedro Castro <pedro gnomesubtitles org>
Date: Sun Sep 18 22:05:10 2011 +0100
Fix format and input regex for Panimator subtitle format.
.../IO/SubtitleFormats/SubtitleFormatPanimator.cs | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/SubLib/IO/SubtitleFormats/SubtitleFormatPanimator.cs b/src/SubLib/IO/SubtitleFormats/SubtitleFormatPanimator.cs
index da8fa70..577629c 100644
--- a/src/SubLib/IO/SubtitleFormats/SubtitleFormatPanimator.cs
+++ b/src/SubLib/IO/SubtitleFormats/SubtitleFormatPanimator.cs
@@ -33,9 +33,9 @@ internal class SubtitleFormatPanimator : SubtitleFormat {
lineBreak = "\n";
- format = @"/d\s+\d+\s+\d+\s+.+\s*/d\s+\d+\s+\d+\s+/c";
+ format = @"/d\s+\d+\s+\d+\s+(.+\n)*\s*/d\s+\d+\s+\d+\s+/c";
- subtitleIn = @"/d\s+(?<StartSeconds>\d+)\s+(?<StartCentiseconds>\d+)\s+(?<Text>.+(\n.+)?)\s+/d\s+(?<EndSeconds>\d+)\s+(?<EndCentiseconds>\d+)\s+/c";
+ subtitleIn = @"/d\s+(?<StartSeconds>\d+)\s+(?<StartCentiseconds>\d+)\s+(?<Text>(.*(?!\n[ \f\r\t\v]*/d[ \f\r\t\v]+\d+[ \f\r\t\v]+\d+[ \f\r\t\v]*\n[ \f\r\t\v]*/c)\n)*.*\n)\s*/d\s+(?<EndSeconds>\d+)\s+(?<EndCentiseconds>\d+)\s+/c";
subtitleOut = "/d <<StartSeconds>> <<StartCentiseconds>>\n<<Text>>\n"
+ "/d <<EndSeconds>> <<EndCentiseconds>>\n/c";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]