Moved emoticon parsing to happen after url parsing so that we don't have smilies accidentally occuring in urls
Этот коммит содержится в:
@@ -36,14 +36,14 @@ export function formatText(text, options = {}) {
|
|||||||
const tokens = new Map();
|
const tokens = new Map();
|
||||||
|
|
||||||
// replace important words and phrases with tokens
|
// replace important words and phrases with tokens
|
||||||
if (!('emoticons' in options) || options.emoticon) {
|
|
||||||
output = Emoticons.handleEmoticons(output, tokens);
|
|
||||||
}
|
|
||||||
|
|
||||||
output = autolinkUrls(output, tokens, !!options.markdown);
|
output = autolinkUrls(output, tokens, !!options.markdown);
|
||||||
output = autolinkAtMentions(output, tokens);
|
output = autolinkAtMentions(output, tokens);
|
||||||
output = autolinkHashtags(output, tokens);
|
output = autolinkHashtags(output, tokens);
|
||||||
|
|
||||||
|
if (!('emoticons' in options) || options.emoticon) {
|
||||||
|
output = Emoticons.handleEmoticons(output, tokens);
|
||||||
|
}
|
||||||
|
|
||||||
if (options.searchTerm) {
|
if (options.searchTerm) {
|
||||||
output = highlightSearchTerm(output, tokens, options.searchTerm);
|
output = highlightSearchTerm(output, tokens, options.searchTerm);
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user