Skip to content

Commit b16a14c

Browse files
committed
Relax front-matter rule to match CR and CRLF
Fix #669
1 parent c76ff9c commit b16a14c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

MacDown/Code/Extension/NSString+Lookup.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ - (NSArray *)matchesForPattern:(NSString *)p
5454

5555
- (id)frontMatter:(NSUInteger *)contentOffset
5656
{
57-
static NSString *pattern = @"^-{3}\n(.*?\n)((?:-{3})|(?:\\.{3}))";
57+
static NSString *pattern =
58+
@"^-{3}[\r\n]+(.*?[\r\n]+)((?:-{3})|(?:\\.{3}))";
5859
NSRegularExpressionOptions op = NSRegularExpressionDotMatchesLineSeparators;
5960
NSRegularExpression *regex =
6061
[NSRegularExpression regularExpressionWithPattern:pattern

0 commit comments

Comments
 (0)