[gnome-subtitles] Fixed parsing of AQTitle subtitles, based on a patch from Pawel57
- From: Pedro Daniel da Rocha Melo e Castro <pcastro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-subtitles] Fixed parsing of AQTitle subtitles, based on a patch from Pawel57
- Date: Sun, 11 Sep 2011 21:37:08 +0000 (UTC)
commit 6a0996b86c656fa7fbdd3625911d3463f4ef326d
Author: Pedro Castro <pedro gnomesubtitles org>
Date: Sun Sep 11 20:23:01 2011 +0100
Fixed parsing of AQTitle subtitles, based on a patch from Pawel57
.../IO/SubtitleFormats/SubtitleFormatAQTitle.cs | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/SubLib/IO/SubtitleFormats/SubtitleFormatAQTitle.cs b/src/SubLib/IO/SubtitleFormats/SubtitleFormatAQTitle.cs
index 19ab2b1..0cf926f 100644
--- a/src/SubLib/IO/SubtitleFormats/SubtitleFormatAQTitle.cs
+++ b/src/SubLib/IO/SubtitleFormats/SubtitleFormatAQTitle.cs
@@ -23,6 +23,7 @@ using System.Text.RegularExpressions;
namespace SubLib.IO.SubtitleFormats {
+//TODO: support empty lines
internal class SubtitleFormatAQTitle : SubtitleFormat {
private static Regex styleExpression = new Regex(@"<[ubi]\w*>", RegexOptions.IgnoreCase);
@@ -36,7 +37,7 @@ internal class SubtitleFormatAQTitle : SubtitleFormat {
format = @"-->>\s*\d+\s+.+\s+-->>\s*\d+";
- subtitleIn = @"-->>\s*(?<StartFrame>\d+)\s*(?<Text>.*\n.*)\n+-->>\s*(?<EndFrame>\d+)";
+ subtitleIn = @"-->>\s*(?<StartFrame>\d+).*\n(?<Text>(.+\n)+)-->>\s*(?<EndFrame>\d+)";
subtitleOut = "-->> <<StartFrame>>\n<<Text>>\n-->> <<EndFrame>>\n";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]