You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it("should automatically link capitalized protocol-relative URLs",function(){
242
+
varresult=autolinker.link("Joe went to //YAHOO.COM");
243
+
expect(result).toBe('Joe went to <a href="//YAHOO.COM">YAHOO.COM</a>');
244
+
});
245
+
246
+
223
247
it("should NOT automatically link supposed protocol-relative URLs in the form of abc//yahoo.com, which is most likely not supposed to be interpreted as a URL",function(){
224
248
varresult=autolinker.link("Joe went to abc//yahoo.com");
225
249
expect(result).toBe('Joe went to abc//yahoo.com');
expect(result).toBe('<a href="https://twitter.com/greg">@greg</a> is tweeting <a href="https://twitter.com/joe">@joe</a> with <a href="https://twitter.com/josh">@josh</a>');
varresult=autolinker.link("@GREG is tweeting @JOE with @JOSH");
507
+
expect(result).toBe('<a href="https://twitter.com/GREG">@GREG</a> is tweeting <a href="https://twitter.com/JOE">@JOE</a> with <a href="https://twitter.com/JOSH">@JOSH</a>');
0 commit comments