@@ -51,8 +51,8 @@ public class StyleRegEx: StyleProtocol {
5151 private var style : StyleProtocol
5252
5353 /// Style attributes
54- public var renderingAttributes : [ NSAttributedString . Key : Any ] {
55- return self . style. renderingAttributes
54+ public var attributes : [ NSAttributedString . Key : Any ] {
55+ return self . style. attributes
5656 }
5757
5858 /// Font attributes
@@ -84,20 +84,20 @@ public class StyleRegEx: StyleProtocol {
8484 //MARK: - METHOD OVERRIDES
8585
8686 public func set( to source: String , range: NSRange ? ) -> AttributedString {
87- let attributed = NSMutableAttributedString ( string: source, attributes: ( self . baseStyle? . renderingAttributes ?? [ : ] ) )
87+ let attributed = NSMutableAttributedString ( string: source, attributes: ( self . baseStyle? . attributes ?? [ : ] ) )
8888 return self . applyStyle ( to: attributed, add: false , range: range)
8989 }
9090
9191 public func add( to source: AttributedString , range: NSRange ? ) -> AttributedString {
9292 if let base = self . baseStyle {
93- source. addAttributes ( base. renderingAttributes , range: ( range ?? NSMakeRange ( 0 , source. length) ) )
93+ source. addAttributes ( base. attributes , range: ( range ?? NSMakeRange ( 0 , source. length) ) )
9494 }
9595 return self . applyStyle ( to: source, add: true , range: range)
9696 }
9797
9898 public func set( to source: AttributedString , range: NSRange ? ) -> AttributedString {
9999 if let base = self . baseStyle {
100- source. setAttributes ( base. renderingAttributes , range: ( range ?? NSMakeRange ( 0 , source. length) ) )
100+ source. setAttributes ( base. attributes , range: ( range ?? NSMakeRange ( 0 , source. length) ) )
101101 }
102102 return self . applyStyle ( to: source, add: false , range: range)
103103 }
@@ -119,9 +119,9 @@ public class StyleRegEx: StyleProtocol {
119119 ( result : NSTextCheckingResult ? , _, _) in
120120 if let r = result {
121121 if add {
122- str. addAttributes ( self . renderingAttributes , range: r. range)
122+ str. addAttributes ( self . attributes , range: r. range)
123123 } else {
124- str. setAttributes ( self . renderingAttributes , range: r. range)
124+ str. setAttributes ( self . attributes , range: r. range)
125125 }
126126 }
127127 }
0 commit comments