equal
deleted
inserted
replaced
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\d\-]+\.[\w\d\-]+\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>'); |
66 addToList(/\*[^*]+\*/gm, '<b>', '</b>'); |
66 addToList(/\*[^*]+\*/gm, '<b>', '</b>'); |
67 addToList(/[\n\r]+/gm, '', '<br />'); |
67 addToList(/[\n\r]+/gm, '', '<br />'); |
68 |
68 |
69 IriSP._(_extend).each(function(x) { |
69 IriSP._(_extend).each(function(x) { |
71 }); |
71 }); |
72 |
72 |
73 positions = IriSP._(positions) |
73 positions = IriSP._(positions) |
74 .chain() |
74 .chain() |
75 .uniq() |
75 .uniq() |
76 .sortBy(function(p) { return parseInt(p) }) |
76 .sortBy(function(p) { return parseInt(p); }) |
77 .value(); |
77 .value(); |
78 |
78 |
79 var res = "", lastIndex = 0; |
79 var res = "", lastIndex = 0; |
80 |
80 |
81 for (var i = 0; i < positions.length; i++) { |
81 for (var i = 0; i < positions.length; i++) { |
125 |
125 |
126 IriSP.FakeClass = function(properties) { |
126 IriSP.FakeClass = function(properties) { |
127 var _this = this, |
127 var _this = this, |
128 noop = (function() {}); |
128 noop = (function() {}); |
129 IriSP._(properties).each(function(p) { |
129 IriSP._(properties).each(function(p) { |
130 _this[p] = noop |
130 _this[p] = noop; |
131 }); |
131 }); |
132 } |
132 }; |