mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Fix emojis not showing in commit messages (#5168)
Fixes #5150 Signed-off-by: James Anderson <james@jamesa.me>
This commit is contained in:
		
				
					committed by
					
						
						techknowlogick
					
				
			
			
				
	
			
			
			
						parent
						
							d4e6278764
						
					
				
				
					commit
					1ceae07560
				
			@@ -1766,6 +1766,11 @@ $(document).ready(function () {
 | 
				
			|||||||
    var hasEmoji = document.getElementsByClassName('has-emoji');
 | 
					    var hasEmoji = document.getElementsByClassName('has-emoji');
 | 
				
			||||||
    for (var i = 0; i < hasEmoji.length; i++) {
 | 
					    for (var i = 0; i < hasEmoji.length; i++) {
 | 
				
			||||||
        emojify.run(hasEmoji[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
 | 
					    // Clipboard JS
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,7 +9,7 @@
 | 
				
			|||||||
				<a class="ui floated right blue tiny button" href="{{EscapePound .SourcePath}}">
 | 
									<a class="ui floated right blue tiny button" href="{{EscapePound .SourcePath}}">
 | 
				
			||||||
					{{.i18n.Tr "repo.diff.browse_source"}}
 | 
										{{.i18n.Tr "repo.diff.browse_source"}}
 | 
				
			||||||
				</a>
 | 
									</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}}
 | 
									{{if IsMultilineCommitMessage .Commit.Message}}
 | 
				
			||||||
					<pre class="commit-body">{{RenderCommitBody .Commit.Message $.RepoLink $.Repository.ComposeMetas}}</pre>
 | 
										<pre class="commit-body">{{RenderCommitBody .Commit.Message $.RepoLink $.Repository.ComposeMetas}}</pre>
 | 
				
			||||||
				{{end}}
 | 
									{{end}}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user