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

feat(wizards): Pretty print XML inside code editor, closes #895 #1199

Merged
merged 1 commit into from
Mar 27, 2023

Conversation

danyill
Copy link
Collaborator

@danyill danyill commented Mar 10, 2023

Closes #895

We use formatXml to save documents.

Is it dangerous to use it here? Perhaps a little bit.

When OpenSCD modifies elements e.g. datasets, subscriptions or supervision elements, the XML it produces is difficult to view in the Ace editor without manually adding linebreaks. This resolves that.

@danyill danyill requested a review from ca-d March 10, 2023 20:16
@danyill danyill changed the title Pretty print XML inside code editor, closes #895 feat(wizards): Pretty print XML inside code editor, closes #895 Mar 12, 2023
@Sander3003
Copy link
Member

Let's try it, @danyill please check if private sections are still working with multiple vendors.

Copy link
Contributor

@ca-d ca-d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, we decided at today's refinement that it would be nice to test this pretty printing on some real world vendor specific Private sections to see if changing whitespace presents a problem in that scenario

@ca-d ca-d force-pushed the issue-895-pretty-print-ace branch from 765796c to 2179744 Compare March 27, 2023 07:15
@danyill
Copy link
Collaborator Author

danyill commented Mar 27, 2023

Thanks for reviewing. I will look into testing this, although it should be no less safe than our existing "Save Project".

@danyill danyill merged commit 18bb1f5 into openscd:main Mar 27, 2023
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

Successfully merging this pull request may close these issues.

Pretty-print XML in code editor
3 participants