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

Support "commenting out" / ignoring nodes easily #198

Open
ingydotnet opened this issue Dec 2, 2024 · 1 comment
Open

Support "commenting out" / ignoring nodes easily #198

ingydotnet opened this issue Dec 2, 2024 · 1 comment

Comments

@ingydotnet
Copy link
Member

It should be possible to ignore any given node (or mapping pair) with a minimal change in the file.

I think a tag is likely the way to go. Something like !X maybe.
The std comment function returns nil which is not the same as ignoring.

Uses I can see right away:

  • Ignore a mapping pair.
  • Ignore a sequence entry
  • Ignore remaining pairs in mapping
  • Ignore remaining entries in sequence
  • Ignore the next n pairs or entries
  • Ignore an entire document in a multi-doc stream

Idea inspired by yaml/yaml-spec#330

@nielsnl68
Copy link

See my reply on my original request mentioned above.

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