Skip to content

Commit

Permalink
updating to 2.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Coeur committed Dec 11, 2016
1 parent f4964d7 commit 35f61dd
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.

---

## [2.1.2](https://github.com/laptobbe/TSMarkdownParser/releases/tag/2.1.2) (2016/12/11)
Released on 2016/12/11.

#### Fixed
* Fixed Unicode links autodetection [#61](https://github.com/laptobbe/TSMarkdownParser/pull/61)


## [2.1.1](https://github.com/laptobbe/TSMarkdownParser/releases/tag/2.1.1) (2016/06/04)
Released on 2016/06/04. All issues associated with this milestone can be found using this [filter](https://github.com/laptobbe/TSMarkdownParser/issues?q=milestone%3A2.1.1+is%3Aclosed).

Expand Down
2 changes: 1 addition & 1 deletion TSMarkdownParser.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "TSMarkdownParser"
s.version = "2.1.1"
s.version = "2.1.2"
s.summary = "A markdown to NSAttributedString parser for iOS and OSX"

s.description = <<-DESC
Expand Down
10 changes: 10 additions & 0 deletions TSMarkdownParserTests/TSMarkdownParserTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,16 @@ - (void)testStandardAutoLinkParsing {
XCTAssertEqualObjects(linkColor, [UIColor blueColor]);
}

- (void)testStandardUnicodeAutoLinkParsing {
NSAttributedString *attributedString = [self.standardParser attributedStringFromMarkdown:@"Hello\n This is a link http://槍ヶ岳山荘.jp to test Wi-Fi\nat home"];
NSURL *link = [attributedString attribute:NSLinkAttributeName atIndex:24 effectiveRange:NULL];
XCTAssertEqualObjects(link, [NSURL URLWithString:[@"http://槍ヶ岳山荘.jp" stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]);
NSNumber *underline = [attributedString attribute:NSUnderlineStyleAttributeName atIndex:24 effectiveRange:NULL];
XCTAssertEqualObjects(underline, @(NSUnderlineStyleSingle));
UIColor *linkColor = [attributedString attribute:NSForegroundColorAttributeName atIndex:24 effectiveRange:NULL];
XCTAssertEqualObjects(linkColor, [UIColor blueColor]);
}

- (void)testStandardLinkParsingOnEndOfStrings {
NSAttributedString *attributedString = [self.standardParser attributedStringFromMarkdown:@"Hello\n This is a [link](https://www.example.net/)"];
NSURL *link = [attributedString attribute:NSLinkAttributeName atIndex:20 effectiveRange:NULL];
Expand Down

0 comments on commit 35f61dd

Please sign in to comment.