mirror of
https://github.com/twisterarmy/twister-calm.git
synced 2025-01-14 08:57:56 +00:00
Merge pull request #25 from dryabov/master
fix break of links and emails
This commit is contained in:
commit
853434376b
@ -179,7 +179,7 @@ function htmlFormatMsg( msg, output, mentions ) {
|
|||||||
if( reHttp.exec(match[1]) ) {
|
if( reHttp.exec(match[1]) ) {
|
||||||
output.append(_formatText(msg.substr(0, index)));
|
output.append(_formatText(msg.substr(0, index)));
|
||||||
tmp = msg.substring(index);
|
tmp = msg.substring(index);
|
||||||
var space = tmp.indexOf(" ");
|
var space = tmp.search(/[ \n\t]/);
|
||||||
var url;
|
var url;
|
||||||
if( space != -1 ) url = tmp.substring(0,space); else url = tmp;
|
if( space != -1 ) url = tmp.substring(0,space); else url = tmp;
|
||||||
if( url.length ) {
|
if( url.length ) {
|
||||||
@ -198,7 +198,7 @@ function htmlFormatMsg( msg, output, mentions ) {
|
|||||||
if( reEmail.exec(match[1]) ) {
|
if( reEmail.exec(match[1]) ) {
|
||||||
output.append(_formatText(msg.substr(0, index)));
|
output.append(_formatText(msg.substr(0, index)));
|
||||||
tmp = msg.substring(index);
|
tmp = msg.substring(index);
|
||||||
var space = tmp.indexOf(" ");
|
var space = tmp.search(/[ \n\t]/);
|
||||||
var email;
|
var email;
|
||||||
if( space != -1 ) email = tmp.substring(0,space); else email = tmp;
|
if( space != -1 ) email = tmp.substring(0,space); else email = tmp;
|
||||||
if( email.length ) {
|
if( email.length ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user