Fix name heuristic generation and make doc less ambiguous#265
Conversation
What is the difference between before and after? |
| n = ni | ||
| nmax = [s.size, 40 - delta].min | ||
| while $seen_slugs[slugex = s[0...n]] && n < nmax | ||
| while $seen_slugs[slugex = s[0...ni]] && n < nmax |
There was a problem hiding this comment.
This essentially counts n to nmax?
(ni doesn't change in the loop, so the termination is on the rhs of the &&)
There was a problem hiding this comment.
My Ruby is extremely rusty and out of date, but if s.size > 32 - delta, it should only count to 32 - delta, and not all the way up to nmax I believe.
Having the boundary of the range expands as the loop iterates did not seem right.
There was a problem hiding this comment.
OK, I don't see the full intention here yet.
Obviously, meddling with the heuristics causes the need for changes in some makefiles, so I'd like to see a significant improvement
Sorry, copy paste error, this is hopefully clearer now. |
Before fix:
After fix: