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

Equivalent of SyntaxNormalizer #51

Open
FrediKats opened this issue Dec 9, 2023 · 1 comment
Open

Equivalent of SyntaxNormalizer #51

FrediKats opened this issue Dec 9, 2023 · 1 comment

Comments

@FrediKats
Copy link
Contributor

Roslyn provides API for normalization whitespaces: https://github.com/dotnet/roslyn/blob/8e4ab418a8f9703f7dfe3a66adc9b3876ef9382f/src/Compilers/CSharp/Portable/Syntax/SyntaxNormalizer.cs#L14

Is this any equivalent of this behavior for XmlParser? My use case:

  1. Parse tree
  2. Add node
  3. Call .NormalizeWhitespace or smth like this
  4. Get Xml with formatter indentations

In source code I found public static class Normalization but look like this normalization works only for attributes.

@KirillOsenkov
Copy link
Owner

I'm afraid we don't have a formatter currently.

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