diff options
author | Hyeseong Kim <cometkim.kr@gmail.com> | 2016-11-24 23:38:56 +0900 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2016-11-24 09:38:56 -0500 |
commit | 2abcc25173ef40b29cdde28856a3f5c9234056d3 (patch) | |
tree | 1a94ee38e5f3827e9fed61c4e70e2f0be57f7708 /webapp/tests/formatting_hashtags.test.jsx | |
parent | 981ea33b8e10456bc279f36235c814305d01b243 (diff) | |
download | chat-2abcc25173ef40b29cdde28856a3f5c9234056d3.tar.gz chat-2abcc25173ef40b29cdde28856a3f5c9234056d3.tar.bz2 chat-2abcc25173ef40b29cdde28856a3f5c9234056d3.zip |
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
Diffstat (limited to 'webapp/tests/formatting_hashtags.test.jsx')
-rw-r--r-- | webapp/tests/formatting_hashtags.test.jsx | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/webapp/tests/formatting_hashtags.test.jsx b/webapp/tests/formatting_hashtags.test.jsx index 37b84a4a8..1c7de1541 100644 --- a/webapp/tests/formatting_hashtags.test.jsx +++ b/webapp/tests/formatting_hashtags.test.jsx @@ -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>" |