Rightpoint / BonMot

Beautiful, easy attributed strings in Swift
MIT License
3.56k stars 197 forks source link

extraAttributes should nest #330

Open ZevEisenberg opened 6 years ago

ZevEisenberg commented 6 years ago
case let .extraAttributes(attributes):
    self.extraAttributes = attributes

Instead of just assigning, we should merge the attributes so that any shared keys in the right-hand side overwrite those keys in the left-hand side.

Question: any way to un-set custom attributes in the left-hand side by passing something in the right-hand side? Or should we just assume that the developer will pass some sentinel value like NSNull()?