fixed nearly 20 parser bugs

This commit is contained in:
rickg@netscape.com
1999-01-20 06:56:07 +00:00
parent 576a1d3089
commit b945b445df
12 changed files with 2234 additions and 976 deletions

View File

@@ -625,9 +625,12 @@ nsresult CCommentToken::Consume(PRUnichar aChar, nsScanner& aScanner) {
//in this case, we're reading a long-form comment <-- xxx -->
mTextValue+="-";
PRInt32 findpos=-1;
while((findpos==kNotFound) && (NS_OK==result)) {
result=aScanner.ReadUntil(mTextValue,kGreaterThan,PR_TRUE);
findpos=mTextValue.RFind("-->");
while((findpos<3) && (NS_OK==result)) {
result=aScanner.ReadUntil(mTextValue,kMinus,PR_TRUE);
findpos=mTextValue.RFind("--");
}
if(NS_OK==result) {
result=aScanner.ReadUntil(mTextValue,kGreaterThan,PR_TRUE); //now skip to '>'
}
return result;
}