File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
44
55---
66
7+ ## [ 2.1.2] ( https://github.com/laptobbe/TSMarkdownParser/releases/tag/2.1.2 ) (2016/12/11)
8+ Released on 2016/12/11.
9+
10+ #### Fixed
11+ * Fixed Unicode links autodetection [ #61 ] ( https://github.com/laptobbe/TSMarkdownParser/pull/61 )
12+
13+
714## [ 2.1.1] ( https://github.com/laptobbe/TSMarkdownParser/releases/tag/2.1.1 ) (2016/06/04)
815Released 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 ) .
916
Original file line number Diff line number Diff line change 11Pod ::Spec . new do |s |
22 s . name = "TSMarkdownParser"
3- s . version = "2.1.1 "
3+ s . version = "2.1.2 "
44 s . summary = "A markdown to NSAttributedString parser for iOS and OSX"
55
66 s . description = <<-DESC
Original file line number Diff line number Diff line change @@ -300,6 +300,16 @@ - (void)testStandardAutoLinkParsing {
300300 XCTAssertEqualObjects (linkColor, [UIColor blueColor ]);
301301}
302302
303+ - (void )testStandardUnicodeAutoLinkParsing {
304+ NSAttributedString *attributedString = [self .standardParser attributedStringFromMarkdown: @" Hello\n This is a link http://槍ヶ岳山荘.jp to test Wi-Fi\n at home" ];
305+ NSURL *link = [attributedString attribute: NSLinkAttributeName atIndex: 24 effectiveRange: NULL ];
306+ XCTAssertEqualObjects (link, [NSURL URLWithString: [@" http://槍ヶ岳山荘.jp" stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]]);
307+ NSNumber *underline = [attributedString attribute: NSUnderlineStyleAttributeName atIndex: 24 effectiveRange: NULL ];
308+ XCTAssertEqualObjects (underline, @(NSUnderlineStyleSingle));
309+ UIColor *linkColor = [attributedString attribute: NSForegroundColorAttributeName atIndex: 24 effectiveRange: NULL ];
310+ XCTAssertEqualObjects (linkColor, [UIColor blueColor ]);
311+ }
312+
303313- (void )testStandardLinkParsingOnEndOfStrings {
304314 NSAttributedString *attributedString = [self .standardParser attributedStringFromMarkdown: @" Hello\n This is a [link](https://www.example.net/)" ];
305315 NSURL *link = [attributedString attribute: NSLinkAttributeName atIndex: 20 effectiveRange: NULL ];
You can’t perform that action at this time.
0 commit comments