-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix bug in value attributes #317
Conversation
return builder.toString(); | ||
} | ||
|
||
// if the field has elided, tostringvalue, abbreviateafter, or ascardinal, | ||
// it should apply to the value instead. | ||
Attributes collectValueAttributes(Attributes fa, Attributes valueAttributes) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a fallback for fields that have attributes set on them that really only apply to the value.
@@ -28,10 +28,26 @@ public String formatField(@NotNull Field field) { | |||
assert fieldVisitor != null; | |||
field = fieldVisitor.visit(field); | |||
} | |||
formatValue(builder, field.value(), attributes); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be using the value's attributes, not the field's attributes
@@ -135,7 +151,7 @@ private void formatObject(@NotNull StringBuilder b, @NotNull Value.ObjectValue v | |||
assert fieldVisitor != null; | |||
field = fieldVisitor.visit(field); | |||
} | |||
formatValue(b, field.value(), attributes); | |||
formatValue(b, field.value(), field.value().attributes()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the value's attributes.
No description provided.