@@ -42,10 +42,10 @@ export class Label extends LabelBase {
42
42
view . userInteractionEnabled = true ;
43
43
view . dataDetectorTypes = UIDataDetectorTypes . All ;
44
44
view . textContainerInset = {
45
- top :0 ,
46
- left :0 ,
47
- bottom :0 ,
48
- right :0
45
+ top : 0 ,
46
+ left : 0 ,
47
+ bottom : 0 ,
48
+ right : 0
49
49
} ;
50
50
return view ;
51
51
}
@@ -145,18 +145,18 @@ export class Label extends LabelBase {
145
145
// [DTDefaultLineBreakMode]: kCTLineBreakByWordWrapping
146
146
} as any ;
147
147
this . htmlText = NSMutableAttributedString . alloc ( ) . initWithHTMLDataOptionsDocumentAttributes ( nsData , options , null ) ;
148
- this . htmlText . enumerateAttributesInRangeOptionsUsingBlock ( { location : 0 , length : this . htmlText . length } , NSAttributedStringEnumerationReverse , (
149
- attributes : NSDictionary < any , any > ,
150
- range ,
151
- stop
152
- ) => {
153
- if ( ! ! attributes . valueForKey ( 'DTGUID' ) ) {
154
- // We need to remove this attribute or links are not colored right
155
- //
156
- // @see https://github.com/Cocoanetics/DTCoreText/issues/792
157
- this . htmlText . removeAttributeRange ( 'CTForegroundColorFromContext' , range ) ;
148
+ this . htmlText . enumerateAttributesInRangeOptionsUsingBlock (
149
+ { location : 0 , length : this . htmlText . length } ,
150
+ NSAttributedStringEnumerationReverse ,
151
+ ( attributes : NSDictionary < any , any > , range , stop ) => {
152
+ if ( ! ! attributes . valueForKey ( 'DTGUID' ) ) {
153
+ // We need to remove this attribute or links are not colored right
154
+ //
155
+ // @see https://github.com/Cocoanetics/DTCoreText/issues/792
156
+ this . htmlText . removeAttributeRange ( 'CTForegroundColorFromContext' , range ) ;
157
+ }
158
158
}
159
- } ) ;
159
+ ) ;
160
160
// console.log('updateHTMLString', this, this.html);
161
161
// const nsString = NSString.stringWithString(htmlString);
162
162
// // console.log('updateHTMLString1');
0 commit comments