File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ function tokenize(text, opts = {}) {
4040 return false ;
4141 } ;
4242 const emoji = ( type , emojiNames ) => {
43- const match = / ^ : ( \w + ) : / . exec ( chunk ) ;
43+ const match = / ^ : ( [ A - Z a - z 0 - 9 _ + - ] + ) : / . exec ( chunk ) ;
4444 if ( match ) {
4545 // if a whitelist of emoji names is given, only accept emoji from that
4646 // list.
Original file line number Diff line number Diff line change @@ -89,6 +89,11 @@ describe('utils/parseChatMarkup', () => {
8989 'and ' ,
9090 { type : 'emoji' , name : 'emoji_with_underscores' }
9191 ] ) ;
92+
93+ expect ( parseChatMarkup ( 'and :emoji-with-dashes+pluses:' , bareOptions ) ) . to . eql ( [
94+ 'and ' ,
95+ { type : 'emoji' , name : 'emoji-with-dashes+pluses' }
96+ ] ) ;
9297 } ) ;
9398
9499 it ( 'parses :emoji: that could also be italics' , ( ) => {
You can’t perform that action at this time.
0 commit comments