private void ScanDocComment(LineProgress p) { p.StartNaturalText(); while (!p.EndOfLine) { if (p.Char() == '<') { // Note that we can only ignore an unwanted element if it is contained on the same line. // Elements that can span lines like "code", will still be spell checked here. if (p.NextChar() != '/' || !this.IgnoredXmlElements.Contains(p.DetermineElementName())) { p.EndNaturalText(); } else { p.IgnoreSpan(); } p.Advance(); p.State = State.DocCommentXml; ScanDocCommentXml(p); p.StartNaturalText(); } else { p.Advance(); } } // End of line. Record what we have and revert to default state. p.EndNaturalText(); if (p.State == State.DocComment) { p.State = State.Default; } }