diff options
author | zeripath <art27@cantab.net> | 2019-02-12 15:09:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-12 15:09:43 +0000 |
commit | 2a03e96bceadfcc5e18bd61e755980ee72dcdb15 (patch) | |
tree | 2ecc1848c76fe458f10dffe568a8bb0cdc0f32ee /modules/markup | |
parent | 296814e887f9bcf0b1d44552deaf40e89e08ab50 (diff) | |
download | gitea-2a03e96bceadfcc5e18bd61e755980ee72dcdb15.tar.gz gitea-2a03e96bceadfcc5e18bd61e755980ee72dcdb15.zip |
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)
Diffstat (limited to 'modules/markup')
-rw-r--r-- | modules/markup/markdown/markdown.go | 2 |
1 files changed, 1 insertions, 1 deletions
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) |