Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XmlDocument reports no diagnostics for invalid xml #43

Open
DoctorKrolic opened this issue Jul 5, 2023 · 1 comment
Open

XmlDocument reports no diagnostics for invalid xml #43

DoctorKrolic opened this issue Jul 5, 2023 · 1 comment

Comments

@DoctorKrolic
Copy link
Contributor

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

@KirillOsenkov
Copy link
Owner

good bug!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants