Пример #1
0
        private GherkinBufferSpan GetDescriptionSpan(int titleEditorLine, string description)
        {
            if (string.IsNullOrEmpty(description) || whitespaceOnlyRe.Match(description).Success)
            {
                return(null);
            }

            int descriptionStartLine = titleEditorLine + 1;

            while (GherkinBuffer.GetMatchForLine(whitespaceOnlyRe, descriptionStartLine) != null)
            {
                descriptionStartLine++;
            }

            int lineCount = GetLineCount(description);

            return(GherkinBuffer.GetLineRangeSpan(descriptionStartLine, descriptionStartLine + lineCount - 1));
        }
Пример #2
0
        private GherkinBufferSpan GetMultilineTextSpan(int editorLine, string text)
        {
            int lineCount = GetLineCount(text) + 2;

            return(GherkinBuffer.GetLineRangeSpan(editorLine, editorLine + lineCount - 1));
        }