diff --git a/rfc/link.go b/rfc/link.go index 1f2028f..edfafc8 100644 --- a/rfc/link.go +++ b/rfc/link.go @@ -149,16 +149,12 @@ func main() { lines = lines[:len(lines)-1] } for i, line := range lines { - if !iserrata && len(line) > 80 { + if !(iserrata && i > 0) && len(line) > 80 { line = strings.TrimRight(line[:80], " ") } refs := lineRefs[i+1] if len(refs) > 0 { - if iserrata { - line = "" - } else { - line = fmt.Sprintf("%-80s", line) - } + line = fmt.Sprintf("%-80s", line) // Lookup source files for rfc:line, so we can cross-link the rfcs. done := map[string]bool{} @@ -181,9 +177,6 @@ func main() { } line += fmt.Sprintf(" %s%s:%d", comment, r.dstpath, r.dstlineno) } - if iserrata { - line = line[1:] - } } line += "\n" b.WriteString(line) diff --git a/rfc/xr.go b/rfc/xr.go index 29f940c..060375d 100644 --- a/rfc/xr.go +++ b/rfc/xr.go @@ -217,7 +217,7 @@ body { font-family: 'ubuntu mono', monospace; } for i, line := range strings.Split(string(buf), "\n") { if line == "" { line = "\n" - } else if len(line) < 80 || strings.Contains(rfc.File, "-") { + } else if len(line) < 80 || strings.Contains(rfc.File, "-") && i > 0 { line = htmltemplate.HTMLEscapeString(line) } else { t := strings.Split(line[80:], " ")