multiline should work with a dictionary

master
Jordan Orelli 10 years ago
parent 5eed96a918
commit 832ec35a05

@ -98,10 +98,18 @@ func (w wordBag) wordString(n int) string {
return buf.String() return buf.String()
case remaining < 8: case remaining < 8:
buf.WriteString(w.randomWordN(remaining)) buf.WriteString(w.randomWordN(remaining))
buf.WriteRune(' ') if rand.Float64() > 0.8 {
buf.WriteRune('\n')
} else {
buf.WriteRune(' ')
}
default: default:
buf.WriteString(w.randomWordBelow(remaining)) buf.WriteString(w.randomWordBelow(remaining))
buf.WriteRune(' ') if rand.Float64() > 0.8 {
buf.WriteRune('\n')
} else {
buf.WriteRune(' ')
}
} }
} }
} }

Loading…
Cancel
Save