Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Replace newlines with break tags to format tweets as the writer inten…
…ded.
  • Loading branch information
drdrang committed Jul 2, 2009
1 parent 788418e commit 09b1fce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion twoot.js
Expand Up @@ -67,7 +67,7 @@ $.fn.gettweets = function(){
'<a class="delete" title="Delete" ' +
'href="javascript:deleteTweet(' + item.id + ')">&#9003;</a>' +
'<div class="tweet_text">' +
item.text.replace(/((https?|ftp):\/\/[^ \n]+[^ \n.,;:?!&'"’”)}\]])/g, '<a href="$1">$1</a>').replace(/[\@]+([A-Za-z0-9-_]+)/g, '<a href="http://twitter.com/$1">@$1</a>') +
item.text.replace(/((https?|ftp):\/\/[^ \n]+[^ \n.,;:?!&'"’”)}\]])/g, '<a href="$1">$1</a>').replace(/[\@]+([A-Za-z0-9-_]+)/g, '<a href="http://twitter.com/$1">@$1</a>').replace(/\n/g, '<br />') +
'<span class="info">' + ' via ' + item.source + inReplyText + '</span>' +
'</div></li>');

Expand Down

0 comments on commit 09b1fce

Please sign in to comment.