fixed bug 2946

git-svn-id: svn://10.0.0.236/trunk@21499 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rickg%netscape.com
1999-02-22 23:17:05 +00:00
parent c93c74cddd
commit c994bcc637
2 changed files with 18 additions and 2 deletions

View File

@@ -704,9 +704,17 @@ nsresult ConsumeComment(PRUnichar aChar, nsScanner& aScanner,nsString& aString)
nsAutoString temp("");
while((kNotFound==findpos) && (NS_OK==result)) {
result=aScanner.ReadUntil(temp,kMinus,PR_TRUE);
if(NS_OK==result) {
result=aScanner.ReadWhile(temp,gEdibles,PR_TRUE,PR_TRUE); //get all available '---'
result=aScanner.ReadWhile(temp,gMinus,PR_TRUE,PR_FALSE); //get all available '---'
aScanner.SkipWhitespace(); //but skip terminating whitespace...
}
if(NS_OK==result) {
result=aScanner.GetChar(aChar);
temp+=aChar;
}
findpos=temp.RFind("-->");
if(kNotFound==findpos)
findpos=temp.RFind("!>");