Skip to content

Commit

Permalink
Remove assumption that mentions tag is 1 character
Browse files Browse the repository at this point in the history
  • Loading branch information
vboctor committed Apr 28, 2016
1 parent a9a2039 commit dc29180
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/mention_api.php
Expand Up @@ -63,6 +63,7 @@ function mention_get_candidates( $p_text ) {
}

$t_mentions_tag = mentions_tag();
$t_mentions_tag_length = strlen( $t_mentions_tag );
$t_separators = "\n\r\t,;:/\\| ";
$t_token = strtok( $p_text, $t_separators );

Expand All @@ -77,7 +78,7 @@ function mention_get_candidates( $p_text ) {
continue;
}

$t_mention = substr( $t_mention, 1 );
$t_mention = substr( $t_mention, $t_mentions_tag_length );
if( is_blank( $t_mention ) ) {
continue;
}
Expand Down

0 comments on commit dc29180

Please sign in to comment.