File: line.go

package info (click to toggle)
golang-gitea-noerw-unidiff-comments 0.0~git20220822.50f4daa%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 336 kB
  • sloc: makefile: 4
file content (29 lines) | stat: -rw-r--r-- 500 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package types

import "regexp"

type Line struct {
	Destination    int64
	Source         int64
	Line           string
	Truncated      bool
	ConflictMarker string
	CommentIds     []int64
	Comments       CommentsTree
}

var danglingSpacesRe = regexp.MustCompile("(?m) +$")

//var lineTpl = tplutil.SparseTemplate("line", `
//{{.Line}}

//{{if .Comments}}
//    {{"\n"}}
//    {{.Comments}}
//{{end}}
//`)

//func (l Line) String() string {
//    result, _ := lineTpl.Execute(l)
//    return result
//}