mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 11:28:24 +00:00 
			
		
		
		
	Allow markdown files to read from the LFS (#5787)
This PR makes it possible for the markdown renderer to render images and media straight from the LFS. Fix #5746 Signed-off-by: Andrew Thornton [art27@cantab.net](mailto:art27@cantab.net)
This commit is contained in:
		| @@ -106,7 +106,7 @@ func (r *Renderer) Image(out *bytes.Buffer, link []byte, title []byte, alt []byt | ||||
| 	if r.IsWiki { | ||||
| 		prefix = util.URLJoin(prefix, "wiki", "raw") | ||||
| 	} | ||||
| 	prefix = strings.Replace(prefix, "/src/", "/raw/", 1) | ||||
| 	prefix = strings.Replace(prefix, "/src/", "/media/", 1) | ||||
| 	if len(link) > 0 && !markup.IsLink(link) { | ||||
| 		lnk := string(link) | ||||
| 		lnk = util.URLJoin(prefix, lnk) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user