for cross-referencing code/rfc, also linkify the errata

This commit is contained in:
Mechiel Lukkien
2023-11-12 12:20:40 +01:00
parent 6a39f2cc54
commit a87ac99038
2 changed files with 3 additions and 10 deletions

View File

@ -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)