aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/markup/renderer.go8
-rw-r--r--modules/structs/miscellaneous.go6
2 files changed, 8 insertions, 6 deletions
diff --git a/modules/markup/renderer.go b/modules/markup/renderer.go
index 66e8cf611d..5eb568cb1f 100644
--- a/modules/markup/renderer.go
+++ b/modules/markup/renderer.go
@@ -86,10 +86,10 @@ type RenderContext struct {
}
type Links struct {
- AbsolutePrefix bool
- Base string
- BranchPath string
- TreePath string
+ AbsolutePrefix bool // add absolute URL prefix to auto-resolved links like "#issue", but not for pre-provided links and medias
+ Base string // base prefix for pre-provided links and medias (images, videos)
+ BranchPath string // actually it is the ref path, eg: "branch/features/feat-12", "tag/v1.0"
+ TreePath string // the dir of the file, eg: "doc" if the file "doc/CHANGE.md" is being rendered
}
func (l *Links) Prefix() string {
diff --git a/modules/structs/miscellaneous.go b/modules/structs/miscellaneous.go
index bff10f95b7..3b206c1dd7 100644
--- a/modules/structs/miscellaneous.go
+++ b/modules/structs/miscellaneous.go
@@ -25,7 +25,8 @@ type MarkupOption struct {
//
// in: body
Mode string
- // Context to render
+ // URL path for rendering issue, media and file links
+ // Expected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir}
//
// in: body
Context string
@@ -53,7 +54,8 @@ type MarkdownOption struct {
//
// in: body
Mode string
- // Context to render
+ // URL path for rendering issue, media and file links
+ // Expected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir}
//
// in: body
Context string