Skip to content

[xref-helper] Inline displayProperty fixer broken when line contains multiple xref links #572

@gewarren

Description

@gewarren

The light bulb displayProperty fixer changes the last xref link in the following sentence, not the one where the cursor is:

<xref:Microsoft.AspNetCore.HttpOverrides.IPNetwork> and <xref:Microsoft.AspNetCore.Builder.ForwardedHeadersOptions.KnownNetworks?displayProperty=nameWithType> have been marked as obsolete in favor of using <xref:System.Net.IPNetwork> and <xref:Microsoft.AspNetCore.Builder.ForwardedHeadersOptions.KnownIPNetworks?displayProperty=nameWithType>.

Worse, if the last xref doesn't have a displayProperty parameter (as in the following sentence) and you use the light bulb to change the displayProperty, everything after the second-last xref is deleted:

These have been marked as obsolete in favor of using <xref:System.Net.IPNetwork?displayProperty=fullName> and <xref:Microsoft.AspNetCore.Builder.ForwardedHeadersOptions.KnownIPNetworks>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions