mirror of
https://github.com/go-gitea/gitea.git
synced 2024-09-27 02:56:01 -04:00
improve comments
This commit is contained in:
parent
38dc928498
commit
8206c90294
@ -88,8 +88,8 @@ type RenderContext struct {
|
||||
type Links struct {
|
||||
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
|
||||
TreePath string
|
||||
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 {
|
||||
|
@ -26,7 +26,7 @@ type MarkupOption struct {
|
||||
// in: body
|
||||
Mode string
|
||||
// URL path for rendering issue, media and file links
|
||||
// Expected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}
|
||||
// Expected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir}
|
||||
//
|
||||
// in: body
|
||||
Context string
|
||||
@ -55,7 +55,7 @@ type MarkdownOption struct {
|
||||
// in: body
|
||||
Mode string
|
||||
// URL path for rendering issue, media and file links
|
||||
// Expected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}
|
||||
// Expected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir}
|
||||
//
|
||||
// in: body
|
||||
Context string
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
|
||||
// RenderMarkup renders markup text for the /markup and /markdown endpoints
|
||||
func RenderMarkup(ctx *context.Base, repo *context.Repository, mode, text, urlPathContext, filePath string, wiki bool) {
|
||||
// urlPathContext format is "/subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file-base-path}"
|
||||
// urlPathContext format is "/subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir}"
|
||||
// filePath is the path of the file to render if the end user is trying to preview a repo file (mode == "file")
|
||||
// filePath will be used as RenderContext.RelativePath
|
||||
|
||||
|
4
templates/swagger/v1_json.tmpl
generated
4
templates/swagger/v1_json.tmpl
generated
@ -22404,7 +22404,7 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Context": {
|
||||
"description": "URL path for rendering issue, media and file links\nExpected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}\n\nin: body",
|
||||
"description": "URL path for rendering issue, media and file links\nExpected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir}\n\nin: body",
|
||||
"type": "string"
|
||||
},
|
||||
"Mode": {
|
||||
@ -22427,7 +22427,7 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Context": {
|
||||
"description": "URL path for rendering issue, media and file links\nExpected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}\n\nin: body",
|
||||
"description": "URL path for rendering issue, media and file links\nExpected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir}\n\nin: body",
|
||||
"type": "string"
|
||||
},
|
||||
"FilePath": {
|
||||
|
Loading…
Reference in New Issue
Block a user