Revert "Merge pull request #4847 from hincupetru/3692-hashtags-inside-markdown-link"
This reverts commit06ab498620, reversing changes made to3c4d8d95d3. Conflicts: Changelog.md
This commit is contained in:
parent
f2fedea3db
commit
cfca0e88f1
3 changed files with 5 additions and 18 deletions
|
|
@ -24,7 +24,6 @@
|
|||
* Fixed Atom Feed Error if reshared Post is deleted [#4638] (https://github.com/diaspora/diaspora/issues/4638)
|
||||
* Show hovercards in the notification drop-down for users on the same pod [#4843](https://github.com/diaspora/diaspora/pull/4843)
|
||||
* The photo stream no longer repeats after the last photo [#4726](https://github.com/diaspora/diaspora/issues/4726)
|
||||
* Stop parsing hashtags inside markdown links [#3692](https://github.com/diaspora/diaspora/issues/3692)
|
||||
* Fix hovercards in the notificaitons dropdown [#4693](https://github.com/diaspora/diaspora/issues/4693)
|
||||
|
||||
## Features
|
||||
|
|
|
|||
|
|
@ -108,16 +108,11 @@ $(function() {
|
|||
};
|
||||
|
||||
textFormatter.hashtagify = function hashtagify(text){
|
||||
var utf8WordCharcters =/(\s|^|>)#([\u0080-\uFFFF|\w|-]+|<3)/g;
|
||||
var linkRegex = /<a[^>]*>(.*?)<\/a>/g;
|
||||
|
||||
if(text.match(linkRegex))
|
||||
return text;
|
||||
else
|
||||
return text.replace(utf8WordCharcters, function(hashtag, preceeder, tagText) {
|
||||
return preceeder + "<a href='/tags/" + tagText.toLowerCase() +
|
||||
"' class='tag'>#" + tagText + "</a>"
|
||||
});
|
||||
var utf8WordCharcters =/(\s|^|>)#([\u0080-\uFFFF|\w|-]+|<3)/g
|
||||
return text.replace(utf8WordCharcters, function(hashtag, preceeder, tagText) {
|
||||
return preceeder + "<a href='/tags/" + tagText.toLowerCase() +
|
||||
"' class='tag'>#" + tagText + "</a>"
|
||||
})
|
||||
};
|
||||
|
||||
textFormatter.mentionify = function mentionify(text, mentions) {
|
||||
|
|
|
|||
|
|
@ -238,13 +238,6 @@ describe("app.helpers.textFormatter", function(){
|
|||
|
||||
expect(formattedText).toContain("/tags/parties")
|
||||
})
|
||||
|
||||
it("doesn't create tag if the text is a link", function(){
|
||||
var link = $('<a/>', { href: 'http://me.co' }).html('#me')[0].outerHTML;
|
||||
var result = this.formatter.hashtagify(link);
|
||||
|
||||
expect(result).toEqual(link);
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue