-
Notifications
You must be signed in to change notification settings - Fork 88
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
emit formatting #37
Comments
Sounds good to me. Per-node flags would be very useful, since it would let users override the style and get exactly what they want. I assume there'd be three flags, block/flow/auto, with block being set by default? Another thing that would be nice to have is the ability to enable wrapping (by setting a maximum line width). With all these additions ryml would be on par with libyaml for formatting options.
Could this not be achieved just by changing the format overload for bool to give "true"/"false" rather than 0/1, or am I missing something? |
I'm using Rapid YAML for merging YAML output from clang-tidy into replacements file. Now is following input
emitted as
It would be great to have option to output value in the original format. |
@rysavyjan sorry for the late reply, somehow I missed your post. You are correct; at the moment ryml does not implement this. This issue is meant to track progress in formatting, but I've not been able to do anything since I opened it. I also won't be able to come back to this in the next month or two. |
Feedback and ideas from using _WIP_STYLE_FLOW_SL = c4bit(14), ///< mark container with single-line flow format (seqs as '[val1,val2], maps as '{key: val, key2: val2}')
_WIP_STYLE_FLOW_ML = c4bit(15), ///< mark container with multi-line flow format (seqs as '[val1,\nval2], maps as '{key: val,\nkey2: val2}')
// sequences should perhaps have a whitespace between each commas to behave like the map.
// ex. [val1, val2]
// Or you could have a default (white-space seperated) and a compact one
_WIP_STYLE_FLOW_SL // [val1, val2]
_WIP_STYLE_FLOW_SL_COMPACT // [val1,val2]
|
Eg, #29 or #30 . Some thoughts:
EmitFormatter
s:The text was updated successfully, but these errors were encountered: