diff options
Diffstat (limited to 'modules/markup/renderer.go')
-rw-r--r-- | modules/markup/renderer.go | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/modules/markup/renderer.go b/modules/markup/renderer.go index 5a7adcc553..0f0bf55740 100644 --- a/modules/markup/renderer.go +++ b/modules/markup/renderer.go @@ -82,9 +82,17 @@ type RenderContext struct { } type Links struct { - Base string - BranchPath string - TreePath string + AbsolutePrefix bool + Base string + BranchPath string + TreePath string +} + +func (l *Links) Prefix() string { + if l.AbsolutePrefix { + return setting.AppURL + } + return setting.AppSubURL } func (l *Links) HasBranchInfo() bool { |