Skip to content

XmlDocument reports no diagnostics for invalid xml #43

@DoctorKrolic

Description

@DoctorKrolic

Steps to reproduce:

using Microsoft.Language.Xml;

var document = Parser.ParseText("""
    <Test>
        <
    </Test>
    """);

Console.WriteLine(document.ContainsDiagnostics);

Expected output:
True

Actual output:
False

The diagnostic is actually there on a nested node in the debugger, but both ContainsDiagnostics and GetDiagnostics() on parent nodes/document pretend like nothing is actually there

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions