From f3a7385ecae3ab1896e26c2c2f01f117df76eb37 Mon Sep 17 00:00:00 2001 From: Florian Staudacher Date: Sat, 24 Mar 2012 21:27:39 +0100 Subject: [PATCH] webkit apparently uses 'undefined' instead of "" for non-matches --- public/javascripts/app/helpers/text_formatter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/javascripts/app/helpers/text_formatter.js b/public/javascripts/app/helpers/text_formatter.js index a5c198805..84f4ba7e6 100644 --- a/public/javascripts/app/helpers/text_formatter.js +++ b/public/javascripts/app/helpers/text_formatter.js @@ -28,7 +28,7 @@ var protocol = arguments[4]; var unicodeUrl = arguments[6]; var asciiUrl = protocol+punycode.toASCII(unicodeUrl); - if(arguments[1] == "") { // inline link + if( !arguments[1] || arguments[1] == "") { // inline link if(arguments[2] == "<") return "["+protocol+unicodeUrl+"]("+asciiUrl+")"; // without link text else return arguments[2]+asciiUrl+arguments[7]; // with link text } else { // reference style link