Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,23 @@ Namespace Microsoft.CodeAnalysis.Editor.UnitTests.IntelliSense
New ClassifiedTextRun(ClassificationTypeNames.Punctuation, "("),
New ClassifiedTextRun(ClassificationTypeNames.Punctuation, ")"))),
New ContainerElement(
ContainerElementStyle.Wrapped,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "• ")),
ContainerElementStyle.Stacked,
New ContainerElement(
ContainerElementStyle.Stacked,
ContainerElementStyle.Wrapped,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "Item 1"))))),
New ContainerElement(
ContainerElementStyle.Wrapped,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "• ")),
New ContainerElement(
ContainerElementStyle.Stacked,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "Item 2")))))
New ClassifiedTextRun(ClassificationTypeNames.Text, "• ")),
New ContainerElement(
ContainerElementStyle.Stacked,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "Item 1")))),
New ContainerElement(
ContainerElementStyle.Wrapped,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "• ")),
New ContainerElement(
ContainerElementStyle.Stacked,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "Item 2")))))))

ToolTipAssert.EqualContent(expected, intellisenseQuickInfo.Item)
End Function
Expand Down Expand Up @@ -120,21 +122,23 @@ Namespace Microsoft.CodeAnalysis.Editor.UnitTests.IntelliSense
New ClassifiedTextRun(ClassificationTypeNames.Punctuation, "("),
New ClassifiedTextRun(ClassificationTypeNames.Punctuation, ")"))),
New ContainerElement(
ContainerElementStyle.Wrapped,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "1. ")),
ContainerElementStyle.Stacked,
New ContainerElement(
ContainerElementStyle.Stacked,
ContainerElementStyle.Wrapped,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "Item 1"))))),
New ContainerElement(
ContainerElementStyle.Wrapped,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "2. ")),
New ContainerElement(
ContainerElementStyle.Stacked,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "Item 2")))))
New ClassifiedTextRun(ClassificationTypeNames.Text, "1. ")),
New ContainerElement(
ContainerElementStyle.Stacked,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "Item 1")))),
New ContainerElement(
ContainerElementStyle.Wrapped,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "2. ")),
New ContainerElement(
ContainerElementStyle.Stacked,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "Item 2")))))))

ToolTipAssert.EqualContent(expected, intellisenseQuickInfo.Item)
End Function
Expand Down Expand Up @@ -179,28 +183,29 @@ Namespace Microsoft.CodeAnalysis.Editor.UnitTests.IntelliSense
New ClassifiedTextRun(ClassificationTypeNames.Punctuation, "("),
New ClassifiedTextRun(ClassificationTypeNames.Punctuation, ")"))),
New ContainerElement(
ContainerElementStyle.Wrapped,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "• ")),
ContainerElementStyle.Stacked,
New ContainerElement(
ContainerElementStyle.Stacked,
ContainerElementStyle.Wrapped,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "word1", ClassifiedTextRunStyle.Bold),
New ClassifiedTextRun(ClassificationTypeNames.WhiteSpace, " "),
New ClassifiedTextRun(ClassificationTypeNames.Text, "–"),
New ClassifiedTextRun(ClassificationTypeNames.Text, "Item 1"))))),
New ContainerElement(
ContainerElementStyle.Wrapped,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "• ")),
New ContainerElement(
ContainerElementStyle.Stacked,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "word2", ClassifiedTextRunStyle.Bold),
New ClassifiedTextRun(ClassificationTypeNames.WhiteSpace, " "),
New ClassifiedTextRun(ClassificationTypeNames.Text, "–"),
New ClassifiedTextRun(ClassificationTypeNames.Text, "Item 2")))))

New ClassifiedTextRun(ClassificationTypeNames.Text, "• ")),
New ContainerElement(
ContainerElementStyle.Stacked,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "word1", ClassifiedTextRunStyle.Bold),
New ClassifiedTextRun(ClassificationTypeNames.WhiteSpace, " "),
New ClassifiedTextRun(ClassificationTypeNames.Text, "–"),
New ClassifiedTextRun(ClassificationTypeNames.Text, "Item 1")))),
New ContainerElement(
ContainerElementStyle.Wrapped,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "• ")),
New ContainerElement(
ContainerElementStyle.Stacked,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "word2", ClassifiedTextRunStyle.Bold),
New ClassifiedTextRun(ClassificationTypeNames.WhiteSpace, " "),
New ClassifiedTextRun(ClassificationTypeNames.Text, "–"),
New ClassifiedTextRun(ClassificationTypeNames.Text, "Item 2")))))))
ToolTipAssert.EqualContent(expected, intellisenseQuickInfo.Item)
End Function

Expand Down Expand Up @@ -244,27 +249,29 @@ Namespace Microsoft.CodeAnalysis.Editor.UnitTests.IntelliSense
New ClassifiedTextRun(ClassificationTypeNames.Punctuation, "("),
New ClassifiedTextRun(ClassificationTypeNames.Punctuation, ")"))),
New ContainerElement(
ContainerElementStyle.Wrapped,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "1. ")),
ContainerElementStyle.Stacked,
New ContainerElement(
ContainerElementStyle.Stacked,
ContainerElementStyle.Wrapped,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "word1", ClassifiedTextRunStyle.Bold),
New ClassifiedTextRun(ClassificationTypeNames.WhiteSpace, " "),
New ClassifiedTextRun(ClassificationTypeNames.Text, "–"),
New ClassifiedTextRun(ClassificationTypeNames.Text, "Item 1"))))),
New ContainerElement(
ContainerElementStyle.Wrapped,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "2. ")),
New ContainerElement(
ContainerElementStyle.Stacked,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "word2", ClassifiedTextRunStyle.Bold),
New ClassifiedTextRun(ClassificationTypeNames.WhiteSpace, " "),
New ClassifiedTextRun(ClassificationTypeNames.Text, "–"),
New ClassifiedTextRun(ClassificationTypeNames.Text, "Item 2")))))
New ClassifiedTextRun(ClassificationTypeNames.Text, "1. ")),
New ContainerElement(
ContainerElementStyle.Stacked,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "word1", ClassifiedTextRunStyle.Bold),
New ClassifiedTextRun(ClassificationTypeNames.WhiteSpace, " "),
New ClassifiedTextRun(ClassificationTypeNames.Text, "–"),
New ClassifiedTextRun(ClassificationTypeNames.Text, "Item 1")))),
New ContainerElement(
ContainerElementStyle.Wrapped,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "2. ")),
New ContainerElement(
ContainerElementStyle.Stacked,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "word2", ClassifiedTextRunStyle.Bold),
New ClassifiedTextRun(ClassificationTypeNames.WhiteSpace, " "),
New ClassifiedTextRun(ClassificationTypeNames.Text, "–"),
New ClassifiedTextRun(ClassificationTypeNames.Text, "Item 2")))))))

ToolTipAssert.EqualContent(expected, intellisenseQuickInfo.Item)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why was this assert removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was not intended, just fixed this in the new commit

End Function
Expand Down Expand Up @@ -357,15 +364,15 @@ Namespace Microsoft.CodeAnalysis.Editor.UnitTests.IntelliSense
New ContainerElement(
ContainerElementStyle.Stacked,
New ContainerElement(
ContainerElementStyle.Wrapped,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "1. ")),
ContainerElementStyle.Stacked,
New ContainerElement(
ContainerElementStyle.Stacked,
ContainerElementStyle.Wrapped,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "Item 2.1")))),
New ContainerElement(
ContainerElementStyle.Stacked Or ContainerElementStyle.VerticalPadding,
New ClassifiedTextRun(ClassificationTypeNames.Text, "1. ")),
New ContainerElement(
ContainerElementStyle.Stacked,
New ClassifiedTextElement(
New ClassifiedTextRun(ClassificationTypeNames.Text, "Item 2.1")))),
New ContainerElement(
ContainerElementStyle.Wrapped,
New ClassifiedTextElement(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ ref TextElementBuilder.AsRef(in nestedBuilder),

case TextTags.ContainerEnd:
// We're finished processing inline elements. Break out and let the caller continue

// Documentation formatting may add an extra LineBreak after ContainerEnd to separate
// elements in LSP scenarios. During rendering, we consume this extra LineBreak to
// prevent double spacing, since each line is already rendered on its own line.
if (taggedTexts is [var head, ..] && head.Tag == TextTags.LineBreak)
{
taggedTexts = taggedTexts[1..];
}
done = true;
break;

Expand Down
Loading