mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
Format sami - will now html-decode characters + reads class attributter a bit better
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@1617 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
a0d334a5fa
commit
2b874b9300
@ -249,7 +249,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
|||||||
var className = new StringBuilder();
|
var className = new StringBuilder();
|
||||||
int startClass = textToLower.IndexOf(" class=");
|
int startClass = textToLower.IndexOf(" class=");
|
||||||
int indexClass = startClass + 7;
|
int indexClass = startClass + 7;
|
||||||
while (indexClass < textToLower.Length && Utilities.LowercaseLettersWithNumbers.Contains(textToLower[indexClass].ToString()))
|
while (indexClass < textToLower.Length && (Utilities.LowercaseLettersWithNumbers + "'\"").Contains(textToLower[indexClass].ToString()))
|
||||||
{
|
{
|
||||||
className.Append(text[indexClass].ToString());
|
className.Append(text[indexClass].ToString());
|
||||||
indexClass++;
|
indexClass++;
|
||||||
@ -359,6 +359,8 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
|||||||
p.EndTime.TotalMilliseconds = p.StartTime.TotalMilliseconds + Utilities.GetOptimalDisplayMilliseconds(p.Text);
|
p.EndTime.TotalMilliseconds = p.StartTime.TotalMilliseconds + Utilities.GetOptimalDisplayMilliseconds(p.Text);
|
||||||
subtitle.Paragraphs.Add(p);
|
subtitle.Paragraphs.Add(p);
|
||||||
}
|
}
|
||||||
|
foreach (Paragraph p2 in subtitle.Paragraphs)
|
||||||
|
p2.Text = Utilities.HtmlDecode(p2.Text);
|
||||||
subtitle.Renumber(1);
|
subtitle.Renumber(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user