Fix issue with emojis next to hashtags and urls
Treat utf8 bytes next to hashtags and urls as boundary conditions Changelog-Fixed: Fix issue with emojis next to hashtags and urls
This commit is contained in:
@@ -231,7 +231,7 @@ int damus_parse_content(struct note_blocks *blocks, const char *content) {
|
||||
}
|
||||
|
||||
pre_mention = cur.p;
|
||||
if (cp == -1 || is_boundary(cp) || c == '#') {
|
||||
if (cp == -1 || is_left_boundary(cp) || c == '#') {
|
||||
if (c == '#' && (parse_mention_index(&cur, &block) || parse_hashtag(&cur, &block))) {
|
||||
if (!add_text_then_block(&cur, blocks, block, &start, pre_mention))
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user