fixes 2) in #33, tags can contain and end with . and -

This commit is contained in:
Hannes Mannerheim 2016-02-16 23:41:29 +01:00
parent a4661e15eb
commit b3200f993a
2 changed files with 4 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -2952,15 +2952,15 @@ $('body').on('keyup paste input', 'div.queet-box-syntax', function() {
}
// long enough match, create a mention span
else {
// don't include ending char, if any of these
// don't include ending char, if any of these (but tags can contain and end with . and -)
if(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].slice(-1) == '-' && k != 'tag')
|| currentMatch[0].slice(-1) == ':'
|| currentMatch[0].slice(-1) == '.'
|| (currentMatch[0].slice(-1) == '.' && k != 'tag')
|| currentMatch[0].slice(-1) == ','
|| currentMatch[0].slice(-1) == ')'
|| currentMatch[0].slice(-1) == '\'') {