Skip to content

Commit

Permalink
Relax front-matter rule to match CR and CRLF
Browse files Browse the repository at this point in the history
Fix #669
  • Loading branch information
uranusjr committed Oct 6, 2016
1 parent c76ff9c commit b16a14c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion MacDown/Code/Extension/NSString+Lookup.m
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ - (NSArray *)matchesForPattern:(NSString *)p

- (id)frontMatter:(NSUInteger *)contentOffset
{
static NSString *pattern = @"^-{3}\n(.*?\n)((?:-{3})|(?:\\.{3}))";
static NSString *pattern =
@"^-{3}[\r\n]+(.*?[\r\n]+)((?:-{3})|(?:\\.{3}))";
NSRegularExpressionOptions op = NSRegularExpressionDotMatchesLineSeparators;
NSRegularExpression *regex =
[NSRegularExpression regularExpressionWithPattern:pattern
Expand Down

0 comments on commit b16a14c

Please sign in to comment.