Skip to content

Significant inline space being removed on Save from Content element #510

Open
@michael-hawker

Description

@michael-hawker

Describe the bug
A clear and concise description of what the bug is.

<Paragraph>
    This example shows how to add a host object to the WebView. See <Hyperlink
        FontWeight="SemiBold"
        NavigateUri="https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2.addhostobjecttoscript"
        UnderlineStyle="None">
        here
    </Hyperlink>
    for more details about the AddHostObjectToScript API.</Paragraph>
<Paragraph />

image

With XAML Styler:

image

<Paragraph>
    This example shows how to add a host object to the WebView. See<Hyperlink

On Save now with XAML Styler enabled, the significant space after See providing separation from the Hyperlink inline element is removed!

To Reproduce
Steps to reproduce the behavior:

  1. When formatting the inline content of a RichTextBlock (WinUI)
            <RichTextBlock IsTextSelectionEnabled="True" TextWrapping="Wrap">
                <Paragraph>
                    This example shows how to add a host object to the WebView. See <Hyperlink
                        FontWeight="SemiBold"
                        NavigateUri="https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2.addhostobjecttoscript"
                        UnderlineStyle="None">
                        here
                    </Hyperlink>
                    for more details about the AddHostObjectToScript API.</Paragraph>
                <Paragraph />
                <Paragraph>
                    Using AddHostObjectToScript in a UWP app requires a different approach then the .NET based injection. See <Hyperlink
                        FontWeight="SemiBold"
                        NavigateUri="https://learn.microsoft.com/en-us/microsoft-edge/webview2/how-to/winrt-from-js?tabs=csharp"
                        UnderlineStyle="None">
                        here
                    </Hyperlink>
                    for more details.</Paragraph>
            </RichTextBlock>
  1. See the spaces between See and the <Hyperlink are removed! They are significant in this context!

Expected behavior
Don't remove significant whitespace in Content text.

External Configuration
If you are using an external configuration, please attach to help reproduce the issue.

Version Info (please complete the following information):

  • OS: Windows 11 22631.4037
  • Visual Studio: VS 2022 17.11.1
  • XAML Styler: Extension 3.2404.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions