Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
3ea6ea31
Unverified
Commit
3ea6ea31
authored
Mar 04, 2026
by
Ashour Badine
Committed by
GitHub
Mar 04, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: tag parsing truncates emojis with variation selectors (#5496)
parent
ce441644
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
tag.go
plugin/markdown/parser/tag.go
+11
-0
tag_test.go
plugin/markdown/parser/tag_test.go
+12
-0
No files found.
plugin/markdown/parser/tag.go
View file @
3ea6ea31
...
...
@@ -47,6 +47,17 @@ func isValidTagRune(r rune) bool {
return
true
}
// Allow marks (non-spacing, spacing combining, enclosing)
// This covers variation selectors (e.g. VS16 \uFE0F) and combining marks (e.g. Keycap \u20E3, accents)
if
unicode
.
IsMark
(
r
)
{
return
true
}
// Allow Zero Width Joiner (ZWJ) for emoji sequences
if
r
==
'\u200D'
{
return
true
}
// Allow specific ASCII symbols for tag structure
// Underscore: word separation (snake_case)
// Hyphen: word separation (kebab-case)
...
...
plugin/markdown/parser/tag_test.go
View file @
3ea6ea31
...
...
@@ -174,6 +174,18 @@ func TestTagParser(t *testing.T) {
expectedTag
:
"test🚀"
,
shouldParse
:
true
,
},
{
name
:
"emoji with VS16"
,
input
:
"#test👁️"
,
// Eye + VS16
expectedTag
:
"test👁️"
,
shouldParse
:
true
,
},
{
name
:
"emoji with ZWJ sequence"
,
input
:
"#family👨👩👧👦"
,
// Family ZWJ sequence
expectedTag
:
"family👨👩👧👦"
,
shouldParse
:
true
,
},
}
for
_
,
tt
:=
range
tests
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment