Exemple #1
0
        void FindSpellingMistakesInXmlTextSyntax(XmlTextSyntax node)
        {
            var allText       = node.ToString();
            var lineTextSpans = CommentTextExtractor.LocateMultiLineCommentTextParts(allText);

            foreach (var lineTextSpan in lineTextSpans)
            {
                var lineText  = allText.Substring(lineTextSpan.Start, lineTextSpan.Length);
                var wordParts = GeneralTextParser.SplitWordParts(lineText);
                foreach (var part in wordParts)
                {
                    if (ShouldWordBeMarkedAsMisspelled(part))
                    {
                        var location = Location.Create(node.SyntaxTree, new TextSpan(node.SpanStart + lineTextSpan.Start + part.Start, part.Length));
                        HandleMistake(location, part.Text, SpellingMistakeKind.Documentation);
                    }
                }
            }
        }
 public override void VisitXmlText(XmlTextSyntax node)
 {
     Debug.Fail(node.ToString());
     base.VisitXmlText(node);
 }