mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-27 00:23:41 +09:00 
			
		
		
		
	fix hljs unintenionally highlighting commit links (#7244)
* fix hljs unintenionally highlighting commit links * fix unit tests
This commit is contained in:
		
				
					committed by
					
						 techknowlogick
						techknowlogick
					
				
			
			
				
	
			
			
			
						parent
						
							a205155e9d
						
					
				
				
					commit
					b209531959
				
			| @@ -197,13 +197,13 @@ func TestRender_AutoLink(t *testing.T) { | ||||
|  | ||||
| 	// render valid commit URLs | ||||
| 	tmp := util.URLJoin(AppSubURL, "commit", "d8a994ef243349f321568f9e36d5c3f444b99cae") | ||||
| 	test(tmp, "<a href=\""+tmp+"\"><code>d8a994ef24</code></a>") | ||||
| 	test(tmp, "<a href=\""+tmp+"\"><code class=\"nohighlight\">d8a994ef24</code></a>") | ||||
| 	tmp += "#diff-2" | ||||
| 	test(tmp, "<a href=\""+tmp+"\"><code>d8a994ef24 (diff-2)</code></a>") | ||||
| 	test(tmp, "<a href=\""+tmp+"\"><code class=\"nohighlight\">d8a994ef24 (diff-2)</code></a>") | ||||
|  | ||||
| 	// render other commit URLs | ||||
| 	tmp = "https://external-link.gogs.io/gogs/gogs/commit/d8a994ef243349f321568f9e36d5c3f444b99cae#diff-2" | ||||
| 	test(tmp, "<a href=\""+tmp+"\"><code>d8a994ef24 (diff-2)</code></a>") | ||||
| 	tmp = "https://external-link.gitea.io/go-gitea/gitea/commit/d8a994ef243349f321568f9e36d5c3f444b99cae#diff-2" | ||||
| 	test(tmp, "<a href=\""+tmp+"\"><code class=\"nohighlight\">d8a994ef24 (diff-2)</code></a>") | ||||
| } | ||||
|  | ||||
| func TestRender_FullIssueURLs(t *testing.T) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user