mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-23 19:52:48 +01:00
Fix Bug when generating Effect Karaoke
This commit is contained in:
parent
d284c6617c
commit
dfc59d31d7
@ -231,20 +231,21 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
const string endFontTag = "</font>";
|
||||
while (i < _paragraph.Text.Length)
|
||||
{
|
||||
var c = _paragraph.Text[i];
|
||||
if (tagOn)
|
||||
{
|
||||
if (_paragraph.Text[i] == '>')
|
||||
tagOn = false;
|
||||
tag += _paragraph.Text[i];
|
||||
tag += c;
|
||||
}
|
||||
else if (_paragraph.Text[i] == '<')
|
||||
{
|
||||
tagOn = true;
|
||||
tag += _paragraph.Text[i];
|
||||
tag += c;
|
||||
}
|
||||
else
|
||||
{
|
||||
text += tag + _paragraph.Text[i];
|
||||
text += tag + c;
|
||||
tag = string.Empty;
|
||||
|
||||
//end tag
|
||||
@ -252,12 +253,12 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
_paragraph.Text[i + 1] == '<' &&
|
||||
_paragraph.Text[i + 2] == '/')
|
||||
{
|
||||
while (i < _paragraph.Text.Length && _paragraph.Text[i] != '>')
|
||||
while (++i < _paragraph.Text.Length && _paragraph.Text[i] != '>')
|
||||
{
|
||||
tag += _paragraph.Text[i];
|
||||
i++;
|
||||
}
|
||||
text += tag;
|
||||
text += tag + '>';
|
||||
tag = string.Empty;
|
||||
}
|
||||
|
||||
string tempText = startFontTag + text + endFontTag;
|
||||
|
Loading…
Reference in New Issue
Block a user