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
Request: extend options to allow for custom anchor names (not just prefix) #166
Comments
If you were to first create a YAML Document instance with your data as contents (as Would that work for you? Otherwise, to implement what you suggest, you should look into adding a second arg for |
Bother. Mis-thought while writing the commit message. Really the new Anchors method is called |
Closing as presumably solved. |
Ah yes, thanks! I think I'm on the right track. (Apologies for not responding, I could have sworn I did, but my brain sometimes composes messages and then forgets to actually tell my fingers.) |
I realize that the anchor names themselves aren't significant in YAML, but I was wondering if you could squeeze in a feature in the
options
to permit a function to generate the anchor name for a given object instead of just allowing a prefix.I'm working with rather large YAML files at the moment, and it would be immensely helpful if the anchor name could be configured to let me smuggle in some contextual information in the name of the anchor, so when I'm reviewing the files, I know what I'm looking at without having to go see the other side of the anchor.
something like :
I took a quick look thru the code to see if I could put it in, but it was starting to get a bit invasive. If you're too busy, I may take another whack at it later in the week.
The text was updated successfully, but these errors were encountered: