You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, the emitter best_width is set to 0 on initialization here:
memset(emitter, 0, sizeof(yaml_emitter_t));
It is then set to 80 in yaml_emitter_emit_stream_starthere:
if (emitter->best_width >= 0&&emitter->best_width <= emitter->best_indent*2) {
emitter->best_width=80;
}
On the Ruby side, we pass the options including :line_width into the emitter, but the code that picks the node style does not account for the libyaml defaults:
This causes the folded style to not apply unless
line_width:
is passed explicitly:The libyaml default of 80 happens as follows:
First, the emitter
best_width
is set to0
on initialization here:It is then set to 80 in
yaml_emitter_emit_stream_start
here:On the Ruby side, we pass the options including
:line_width
into the emitter, but the code that picks the node style does not account for the libyaml defaults:We should probably also default to 80 in yaml_tree.rb for uniform handling.
The text was updated successfully, but these errors were encountered: