@ -12,6 +12,7 @@ enum AttributeScope {
class Attribute<T> {
Attribute(this.key, this.scope, this.value);
/// Unique key of this attribute.
final String key;
final AttributeScope scope;
final T value;
@ -101,6 +101,13 @@ abstract class Leaf extends Node {
}
@override
String toString() {
final keys = style.keys.toList(growable: false)..sort();
final styleKeys = keys.join();
return '⟨$value⟩$styleKeys';
/// Adjust this text node by merging it with adjacent nodes if they share
/// the same style.