Skip to content

Commit cd1d575

Browse files
committed
Issues-433: support '+', '-' in mentions
1 parent a94b06b commit cd1d575

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/topcodereditor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
setTimeout(function() {
3535
var cursor = cm.getCursor(), line = cm.getLine(cursor.line);
3636
var start = cursor.ch, end = cursor.ch
37-
while (start && /[\w\.]/.test(line.charAt(start - 1))) --start
38-
while (end < line.length && /[\w\.]/.test(line.charAt(end))) ++end
37+
while (start && /[\w\.\+-]/.test(line.charAt(start - 1))) --start
38+
while (end < line.length && /[\w\.\+-]/.test(line.charAt(end))) ++end
3939
var word = line.slice(start, end).toLowerCase();
4040
if(word.length > 1) {
4141
$.ajax({

0 commit comments

Comments
 (0)