Skip to content

Commit

Permalink
Fix emojis not showing in commit messages (#5168)
Browse files Browse the repository at this point in the history
Fixes #5150

Signed-off-by: James Anderson <james@jamesa.me>
  • Loading branch information
jamesa authored and techknowlogick committed Oct 29, 2018
1 parent d4e6278 commit 1ceae07
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions public/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1766,6 +1766,11 @@ $(document).ready(function () {
var hasEmoji = document.getElementsByClassName('has-emoji');
for (var i = 0; i < hasEmoji.length; i++) {
emojify.run(hasEmoji[i]);
for (var j = 0; j < hasEmoji[i].childNodes.length; j++) {
if (hasEmoji[i].childNodes[j].nodeName === "A") {
emojify.run(hasEmoji[i].childNodes[j])
}
}
}

// Clipboard JS
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/diff/page.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<a class="ui floated right blue tiny button" href="{{EscapePound .SourcePath}}">
{{.i18n.Tr "repo.diff.browse_source"}}
</a>
<h3>{{RenderCommitMessage .Commit.Message $.RepoLink $.Repository.ComposeMetas}}{{template "repo/commit_status" .CommitStatus}}</h3>
<h3 class="has-emoji">{{RenderCommitMessage .Commit.Message $.RepoLink $.Repository.ComposeMetas}}{{template "repo/commit_status" .CommitStatus}}</h3>
{{if IsMultilineCommitMessage .Commit.Message}}
<pre class="commit-body">{{RenderCommitBody .Commit.Message $.RepoLink $.Repository.ComposeMetas}}</pre>
{{end}}
Expand Down

0 comments on commit 1ceae07

Please sign in to comment.