New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't mangle leading hyphens to underscores #2011
Conversation
The mangling rules are already somewhat complicated, and this makes them thornier. It isn't clear to me in the documentation and tests how leading underscores and leading hyphens are supposed to interact. The order of operations seems to be important. In Did you check for any leading hyphens in the docs that need to be changed? |
This is more than 3 days old now. Can it get merged? |
No, I've indicated that I don't approve of it in its present form, so the three-day rule doesn't apply. Sunjay needs to either address my concerns or get another reviewer. |
Yup sorry I haven't circled back to this yet, I (unfortunately) have project deadlines that take priority for the time being |
No problem. |
I simplified the leading-hyphen rule to the bare minimum, which makes it much easier to describe in the docs and removes the ambiguity about hyphens vs. underscores: I also changed
Done!
Yup, (aside from the style guide showing what not to do) I didn't find any leading hyphens in the docs. |
Sorry man, but "It [still] isn't clear to me in the documentation and tests how leading underscores and [a] leading hyphen are supposed to interact. The order of operations seems to be important." Like, what do Also, your documentation still refers to "leading hyphens" although you're now only treating a single leading hyphen specially. |
Also, I would join your example blocks; e.g.,
can be written
|
Ok! I've updated the documentation to list the mangling algorithm as a sequence of steps, hopefully it's more clear now how the different mangling rules interact and also clears up that it's just the initial hyphen (if any) that is not converted to an underscore. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good.
@peaceamongworlds I've made changes to the new mangling rules since you first approved them, does your approval still stand? |
Yep, I'm still happy with this. |
@peaceamongworlds Thanks, but next time, don't forget to rebase onto the current master before merging. |
Oh sure. I guess that has to be done manually, since github says that rebase and merge is not enable for this repo? |
It has to be done manually, yes. The "Rebase and merge" option on GitHub is misleading: it rebases all the commits onto master and then fast-forwards master instead of merging. I've disabled this so it isn't done by accident. |
Fixes #1635.