Skip to content

Commit

Permalink
add support for <b>, <i> and <u>
Browse files Browse the repository at this point in the history
  • Loading branch information
Menno Pruijssers committed Apr 24, 2012
1 parent 4ae0d3d commit e02e899
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Core/Source/DTHTMLAttributedStringBuilder.m
Expand Up @@ -650,6 +650,26 @@ - (void)_registerTagStartHandlers

[_tagStartHandlers setObject:[fontBlock copy] forKey:@"font"];

void (^bBlock)(void) = ^
{
currentTag.fontDescriptor.boldTrait = YES;
};

[_tagStartHandlers setObject:[bBlock copy] forKey:@"b"];

void (^iBlock)(void) = ^
{
currentTag.fontDescriptor.italicTrait = YES;
};

[_tagStartHandlers setObject:[iBlock copy] forKey:@"i"];

void (^uBlock)(void) = ^
{
currentTag.underlineStyle = kCTUnderlineStyleSingle;
};

[_tagStartHandlers setObject:[uBlock copy] forKey:@"u"];

void (^pBlock)(void) = ^
{
Expand Down

2 comments on commit e02e899

@odrobnik
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is entirely unnecessary, these tags are handled by the standard style sheet.

@mennopruijssers
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah my bad :). Think I had a typo... Now it's working correctly. Thanks!

Please sign in to comment.