Fix emojis not showing in commit messages#5168
Merged
Merged
Conversation
Fixes #5150 Signed-off-by: James Anderson <james@jamesa.me>
Contributor
Author
Codecov Report
@@ Coverage Diff @@
## master #5168 +/- ##
========================================
Coverage ? 37.5%
========================================
Files ? 309
Lines ? 45827
Branches ? 0
========================================
Hits ? 17187
Misses ? 26177
Partials ? 2463Continue to review full report at Codecov.
|
techknowlogick
approved these changes
Oct 29, 2018
adelowo
approved these changes
Oct 29, 2018
7 tasks
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Fixes #5150
This fixes the issue where emojis were not showing up in the commit messages in the file tree, and on the commit view.
I was looking at two approaches for this:
I went with the second approach and would like some feedback on that. I went this route instead of modifying the code that generates the commit link, since it looked like I would need to make a new processor in
modules/markup/html.goto facilitate adding thehas-emojiclass to these links. And that seemed like overkill for this small use case.It seems natural for emojify to work on children of the
has-emojielements, but it doesn't. (Deprecated, and only used to work by ID). So this will look at the children of eachhas-emojielement and insert emojis into any children that are links.I only added emojis to links because I was worried about potential performance impacts if an element has a lot of children. If you think that's still a concern though then maybe we should go with the first approach?
Thanks for your consideration and feedback!