mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 05:18:25 +00:00 
			
		
		
		
	Make cross-reference issue links work in markdown documents again (#28682)
In #26365 issue references were disabled entirely for documents, intending to match GitHub behavior. However cross-references do appear to work in documents on GitHub. This is useful for example to write release notes in a markdown document and reference issues. While the simpler syntax may create links when not intended, hopefully the cross-reference syntax is unique enough to avoid it.
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							91aa263225
						
					
				
				
					commit
					12c0487e01
				
			@@ -561,11 +561,16 @@ func TestPostProcess_RenderDocument(t *testing.T) {
 | 
			
		||||
		assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(res.String()))
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// Issue index shouldn't be post processing in an document.
 | 
			
		||||
	// Issue index shouldn't be post processing in a document.
 | 
			
		||||
	test(
 | 
			
		||||
		"#1",
 | 
			
		||||
		"#1")
 | 
			
		||||
 | 
			
		||||
	// But cross-referenced issue index should work.
 | 
			
		||||
	test(
 | 
			
		||||
		"go-gitea/gitea#12345",
 | 
			
		||||
		`<a href="`+util.URLJoin(markup.TestAppURL, "go-gitea", "gitea", "issues", "12345")+`" class="ref-issue">go-gitea/gitea#12345</a>`)
 | 
			
		||||
 | 
			
		||||
	// Test that other post processing still works.
 | 
			
		||||
	test(
 | 
			
		||||
		":gitea:",
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user