Skip to content

Commit

Permalink
Added second test for auto-linking inside fenced pre
Browse files Browse the repository at this point in the history
  • Loading branch information
odrobnik committed Oct 25, 2013
1 parent 63e21d7 commit 9b5e1d2
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Test/Source/DTMarkdownParserTest.m
Expand Up @@ -969,7 +969,7 @@ - (void)testAutoLinkingEmail
STAssertEqualObjects(actual, expected, @"Expected result did not match");
}

- (void)testAutoLinkingEmailInsidePre
- (void)testAutoLinkingEmailInsideCode
{
NSString *string = @"`Mail me at oliver@cocoanetics.com.`";

Expand All @@ -984,6 +984,21 @@ - (void)testAutoLinkingEmailInsidePre
STAssertEqualObjects(actual, expected, @"Expected result did not match");
}

- (void)testAutoLinkingEmailInsidePre
{
NSString *string = @"```\nMail me at oliver@cocoanetics.com.\n```";

DTMarkdownParser *parser = [self _parserForString:string options:0];

BOOL result = [parser parse];
STAssertTrue(result, @"Parser should return YES");

NSString *expected = @"<pre><code>Mail me at oliver@cocoanetics.com.\n</code></pre>\n";
NSString *actual = [self _HTMLFromInvocations];

STAssertEqualObjects(actual, expected, @"Expected result did not match");
}

- (void)testAutoLinkingPhone
{
NSString *string = @"Call me at +436991234567";
Expand Down

0 comments on commit 9b5e1d2

Please sign in to comment.