mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-26 06:16:56 +09:00
refactor: clean up pull request comment related code and template dict (#39789)
1. drop comment.commit_id 2. refactor templates, remove `dict "." .` from templates
This commit is contained in:
1 parent
1c117a9352
commit
222136ee71
28 files changed
+321
-266
No files matched your search
@@ -142,12 +142,13 @@ const (
|
||||
MaxFullFileHighlightTimeLimit = 2 * time.Second
|
||||
)
|
||||
|
||||
// GetType returns the type of DiffLine.
|
||||
func (d *DiffLine) GetType() int {
|
||||
return int(d.Type)
|
||||
}
|
||||
func (d *DiffLine) IsDiffLinePlain() bool { return d.Type == DiffLinePlain }
|
||||
func (d *DiffLine) IsDiffLineAdd() bool { return d.Type == DiffLineAdd }
|
||||
func (d *DiffLine) IsDiffLineDel() bool { return d.Type == DiffLineDel }
|
||||
func (d *DiffLine) IsDiffLineSection() bool { return d.Type == DiffLineSection }
|
||||
|
||||
// GetHTMLDiffLineType returns the diff line type name for HTML
|
||||
// GetHTMLDiffLineType returns the diff line type name for HTML,
|
||||
// it will generate CSS names for styles ".del-code", ".add-code", ".same-code", ".tag-code"
|
||||
func (d *DiffLine) GetHTMLDiffLineType() string {
|
||||
switch d.Type {
|
||||
case DiffLineAdd:
|
||||
|
||||
Reference in new issue
Block a user