Skip to content

Added Strong & Emphasis formatter#68

Open
stephanheilner wants to merge 3 commits into
laptobbe:masterfrom
stephanheilner:strong_emphasis
Open

Added Strong & Emphasis formatter#68
stephanheilner wants to merge 3 commits into
laptobbe:masterfrom
stephanheilner:strong_emphasis

Conversation

@stephanheilner

Copy link
Copy Markdown

No description provided.

@Coeur Coeur self-assigned this Mar 5, 2018
@Coeur

Coeur commented Mar 5, 2018

Copy link
Copy Markdown
Collaborator

Thank you @stephanheilner. As DaringFireball is effectively supporting this combination, I'll accept this workaround for branch 2.x.

Note that branch 3.x will work differently, with traits.

@Coeur Coeur added this to the 2.2.0 milestone Mar 5, 2018
[attributedString addAttributes:weakParser.emphasisAttributes range:range];
}];

[defaultParser addStrongAndEmphasisParsingWithFormattingBlock:^(NSMutableAttributedString *attributedString, NSRange range) {

@Coeur Coeur Mar 5, 2018

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I may move this line before Strong and Emphasis.

Comment thread TSMarkdownParser/TSMarkdownParser.m Outdated
#endif
_strongAttributes = @{ NSFontAttributeName: [UIFont boldSystemFontOfSize:defaultSize] };

_strongAndEmphasisAttributes = @{ NSFontAttributeName: [UIFont fontWithDescriptor:[[[UIFont systemFontOfSize:defaultSize] fontDescriptor] fontDescriptorWithSymbolicTraits:(UIFontDescriptorTraitBold | UIFontDescriptorTraitItalic)] size:defaultSize] };

@Coeur Coeur Mar 5, 2018

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

not building on macOS target or iOS 6

@Coeur

Coeur commented Mar 5, 2018

Copy link
Copy Markdown
Collaborator

Ah, well, sadly, it doesn't work for iOS 6 and macOS, so it's better to wait for TSMarkdownParser 3.0, as it will give proper support for it.

@Coeur Coeur left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

needs to keep compatibility with macOS target

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants