Skip to content

Commit

Permalink
docs(website): improve matching gitmoji tip (#486)
Browse files Browse the repository at this point in the history
Emojis are hard. The pattern was not matching the recycling emoji, for some reason.

Adding the variation selector`u{FE0F}` fixes it.

Further, this makes the zero-width joiner (`u{200D}`) optional, matching emojis both with and without the ZWJ.
  • Loading branch information
welpo authored Feb 14, 2024
1 parent 4713f64 commit 0731646
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/docs/tips-and-tricks.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ Then strip the tags in the template with the series of filters:
[git]
commit_preprocessors = [
# Remove gitmoji, both actual UTF emoji and :emoji:
{ pattern = ' *(:\w+:|[\p{Emoji_Presentation}\p{Extended_Pictographic}\u{200D}]) *', replace = "" },
{ pattern = ' *(:\w+:|[\p{Emoji_Presentation}\p{Extended_Pictographic}](?:\u{FE0F})?\u{200D}?) *', replace = "" },
]
```

0 comments on commit 0731646

Please sign in to comment.