Don't assume override blocks always start with a backslash, since many people use them for comments
Originally committed to SVN as r1202.
This commit is contained in:
parent
5a4e03312a
commit
50aab0f08f
1 changed files with 5 additions and 1 deletions
|
@ -112,9 +112,11 @@ void AssDialogueBlockOverride::ParseTags () {
|
||||||
|
|
||||||
// Initialize tokenizer
|
// Initialize tokenizer
|
||||||
wxStringTokenizer tkn(text,_T("\\"),wxTOKEN_RET_EMPTY_ALL);
|
wxStringTokenizer tkn(text,_T("\\"),wxTOKEN_RET_EMPTY_ALL);
|
||||||
|
wxString curTag;
|
||||||
|
if (text.StartsWith(_T("\\"))) curTag = _T("\\");
|
||||||
|
|
||||||
while (tkn.HasMoreTokens()) {
|
while (tkn.HasMoreTokens()) {
|
||||||
wxString curTag = _T("\\");
|
//curTag will always start with a backslash after first loop - see end of loop
|
||||||
curTag += tkn.GetNextToken();
|
curTag += tkn.GetNextToken();
|
||||||
if (curTag == _T("\\")) continue;
|
if (curTag == _T("\\")) continue;
|
||||||
|
|
||||||
|
@ -130,6 +132,8 @@ void AssDialogueBlockOverride::ParseTags () {
|
||||||
AssOverrideTag *newTag = new AssOverrideTag;
|
AssOverrideTag *newTag = new AssOverrideTag;
|
||||||
newTag->SetText(curTag);
|
newTag->SetText(curTag);
|
||||||
Tags.push_back(newTag);
|
Tags.push_back(newTag);
|
||||||
|
|
||||||
|
curTag = _T("\\");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue