mentions etc can start and end with parenthesis

This commit is contained in:
Hannes Mannerheim 2016-01-29 16:48:05 +01:00
parent 352ab5bc75
commit c10c4d1a2f
2 changed files with 12 additions and 10 deletions

File diff suppressed because one or more lines are too long

View File

@ -2921,12 +2921,14 @@ $('body').on('keyup paste input', 'div.queet-box-syntax', function() {
|| currentMatch[0].slice(-1) == '-'
|| currentMatch[0].slice(-1) == ':'
|| currentMatch[0].slice(-1) == '.'
|| currentMatch[0].slice(-1) == ',') {
|| currentMatch[0].slice(-1) == ','
|| currentMatch[0].slice(-1) == ')') {
currentMatch[0] = currentMatch[0].slice(0,-1);
}
// remove any starting spaces from match
if(currentMatch[0].substring(0,1) == ' ') {
// don't include these start strings
if(currentMatch[0].substring(0,1) == ' '
|| currentMatch[0].substring(0,1) == '(') {
currentMatch[0] = currentMatch[0].substring(1);
}
else if(currentMatch[0].substring(0,6) == ' ') {