Closed karlcow closed 10 years ago
Thanks @karlcow - I'll take this fix with a few simple changes ;-)
1) Please make "linkified" an argument to the addPreText(id, text) method: addPreText(id, text, linkified) 2) (as a consequence of step 1, you can drop the variable declared on line 3) 3) Please reverse the logic so that "linkified" being true means "this text is linkified already" - right now the script will linkify the new text node if linkified is true. 4) In JavaScript, you can omit arguments to a method - an omitted argument will have the value "undefined" which evaluates to false in a boolean context. Hence, you don't need to fix all calls to addPreText() - it's enough to add ", true" to those calls you pass pre-linkified text to. Simple ;)
(although writing code that sometimes uses two and sometimes three arguments for a method might be considered bad practise and you're free to fix that if you find it aestetically ugly or something..)
Trying to fix the linkified issue for boilerplate text.