Skip to content

Commit

Permalink
Fix an issue for quote
Browse files Browse the repository at this point in the history
1. Parser now can parse multiple paragraph correctly.

2. Change the style of quote so it is easy to  distinguish from common
text
  • Loading branch information
Cokile committed Apr 22, 2016
1 parent 7f46070 commit de30cf7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TSMarkdownParser/TSMarkdownParser.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ - (instancetype)init {
@{ NSFontAttributeName: [UIFont boldSystemFontOfSize:15] },
@{ NSFontAttributeName: [UIFont boldSystemFontOfSize:13] } ];
_listAttributes = @[];
_quoteAttributes = @[];
_quoteAttributes = @[@{NSFontAttributeName: [UIFont fontWithName:@"Georgia-Italic" size:12]}];

_imageAttributes = @{};
_linkAttributes = @{ NSForegroundColorAttributeName: [UIColor blueColor],
Expand Down Expand Up @@ -146,7 +146,7 @@ + (void)addAttributes:(NSArray<NSDictionary<NSString *, id> *> *)attributesArray
static NSString *const TSMarkdownShortHeaderRegex = @"^(#{1,%@})\\s*([^#].*)$";
static NSString *const TSMarkdownListRegex = @"^([\\*\\+\\-]{1,%@})\\s+(.+)$";
static NSString *const TSMarkdownShortListRegex = @"^([\\*\\+\\-]{1,%@})\\s*([^\\*\\+\\-].*)$";
static NSString *const TSMarkdownQuoteRegex = @"^(\\>{1,%@})\\s+(.+)$";
static NSString *const TSMarkdownQuoteRegex = @"^(\\>{1,%@})(.+)$";
static NSString *const TSMarkdownShortQuoteRegex = @"^(\\>{1,%@})\\s*([^\\>].*)$";

// inline bracket regex
Expand Down

0 comments on commit de30cf7

Please sign in to comment.