src/js/utils.js
changeset 1002 a86208b60c91
parent 1001 3210bf928a11
child 1013 392ddcd212d7
equal deleted inserted replaced
1001:3210bf928a11 1002:a86208b60c91
    55     
    55     
    56     if (_regexp) {
    56     if (_regexp) {
    57         addToList(_regexp, '<span class="Ldt-Highlight">', '</span>');
    57         addToList(_regexp, '<span class="Ldt-Highlight">', '</span>');
    58     }
    58     }
    59     
    59     
    60     addToList(/(https?:\/\/)?\w+\.\w+\S+/gm, function(matches) {
    60     addToList(/(https?:\/\/)?[\w\d\-]+\.[\w\d\-]+\S+/gm, function(matches) {
    61         return '<a href="' + (matches[1] ? '' : 'http://') + matches[0] + '" target="_blank">'
    61         return '<a href="' + (matches[1] ? '' : 'http://') + matches[0] + '" target="_blank">'
    62     }, '</a>');
    62     }, '</a>');
    63     addToList(/@([\d\w]{1,15})/gm, function(matches) {
    63     addToList(/@([\d\w]{1,15})/gm, function(matches) {
    64         return '<a href="http://twitter.com/' + matches[1] + '" target="_blank">'
    64         return '<a href="http://twitter.com/' + matches[1] + '" target="_blank">'
    65     }, '</a>');
    65     }, '</a>');