Nicer comments
This commit is contained in:
parent
b7e1cacbd9
commit
38102fbc3a
1 changed files with 2 additions and 3 deletions
5
main.go
5
main.go
|
@ -78,7 +78,7 @@ func main() {
|
||||||
// Add our own credits
|
// Add our own credits
|
||||||
tpldata.Credits += "\n" + HTMLrocCredits
|
tpldata.Credits += "\n" + HTMLrocCredits
|
||||||
|
|
||||||
// Rules are after TOC
|
// Rules are after TOC, so find end of TOC
|
||||||
tocend := strings.Index(filestr, "\n\n")
|
tocend := strings.Index(filestr, "\n\n")
|
||||||
if tocend < 0 {
|
if tocend < 0 {
|
||||||
fmt.Fprintln(os.Stderr, "could not find end of TOC")
|
fmt.Fprintln(os.Stderr, "could not find end of TOC")
|
||||||
|
@ -88,7 +88,7 @@ func main() {
|
||||||
// Strip TOC out
|
// Strip TOC out
|
||||||
filestr = filestr[tocend+2:]
|
filestr = filestr[tocend+2:]
|
||||||
|
|
||||||
// Every rule is a line (pretty handy!)
|
// Every rule is almost always a line (pretty handy!)
|
||||||
lines := strings.Split(filestr, "\n")
|
lines := strings.Split(filestr, "\n")
|
||||||
var currentSection *TemplateSection
|
var currentSection *TemplateSection
|
||||||
for _, line := range lines {
|
for _, line := range lines {
|
||||||
|
@ -131,7 +131,6 @@ func main() {
|
||||||
|
|
||||||
// It's a new rule
|
// It's a new rule
|
||||||
case isRule:
|
case isRule:
|
||||||
|
|
||||||
// ID is between ()s
|
// ID is between ()s
|
||||||
endID := strings.IndexRune(trimmed, ')')
|
endID := strings.IndexRune(trimmed, ')')
|
||||||
if endID < 0 {
|
if endID < 0 {
|
||||||
|
|
Loading…
Reference in a new issue