Keep a read's null with its draw, share the lone-reference check, name a JSON-string item's object form again, prove each column once per pass, and read a record off template.record
Tests / vet + fmt + tests (pull_request) Successful in 1m3s
Tests / vet + fmt + tests (pull_request) Successful in 1m3s
This commit is contained in:
@@ -101,12 +101,8 @@ func loneReference(arg string) (string, bool) {
|
||||
raw = m["format"]
|
||||
}
|
||||
format, isString := raw.(string)
|
||||
var units []ftoken
|
||||
if !isString || eachToken(format, func(t ftoken) error { units = append(units, t); return nil }) != nil || len(units) != 1 {
|
||||
return "", false
|
||||
}
|
||||
body := units[0].body
|
||||
if units[0].kind != 'b' || !isRef(body) || strings.ContainsAny(body, "|(") {
|
||||
body, lone := loneRef(format)
|
||||
if !isString || !lone {
|
||||
return "", false
|
||||
}
|
||||
if strings.HasPrefix(body, "/") {
|
||||
|
||||
Reference in New Issue
Block a user