PLT-2077 Support CJK hashtags (#4555)
* Add Korean character ranges to exist CJK pattern * Add constant for CJK hashtags Becuase most of keywords in CJK are two characters * Add CJK ranges to hashtag pattern to handle it. * Fixes hashtag pattern to apply numbers at last * Remove a wrong test case `test_` shouldn't be a hashtag * Fix hashtag regex to support standard unicodes * Remove wrong escapes from regex
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
981ea33b8e
Коммит
2abcc25173
@@ -73,12 +73,6 @@ describe('TextFormatting.Hashtags', function() {
|
||||
"<p><a class='mention-link' href='#' data-hashtag='#test'>#test</a>.</p>"
|
||||
);
|
||||
|
||||
// Known issue, trailing underscore is captured by the clientside regex but not the serverside one
|
||||
assert.equal(
|
||||
TextFormatting.formatText('#test_').trim(),
|
||||
"<p><a class='mention-link' href='#' data-hashtag='#test_'>#test_</a></p>"
|
||||
);
|
||||
|
||||
assert.equal(
|
||||
TextFormatting.formatText('This is a sentence #test containing a hashtag').trim(),
|
||||
"<p>This is a sentence <a class='mention-link' href='#' data-hashtag='#test'>#test</a> containing a hashtag</p>"
|
||||
|
||||
Ссылка в новой задаче
Block a user