From 2a03e96bceadfcc5e18bd61e755980ee72dcdb15 Mon Sep 17 00:00:00 2001 From: zeripath Date: Tue, 12 Feb 2019 15:09:43 +0000 Subject: 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) --- modules/markup/markdown/markdown.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/markup') diff --git a/modules/markup/markdown/markdown.go b/modules/markup/markdown/markdown.go index 5022e0e235..1525ba7812 100644 --- a/modules/markup/markdown/markdown.go +++ b/modules/markup/markdown/markdown.go @@ -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) -- cgit v1.2.3