-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Add anchors to bullets #338
Conversation
These margins will want to be reset eventually. First attempt at auto-resetting with VIM |
This pull request adds anchors, but doesn't seem to include any user-friendly way of discovering them. See also #319 |
Yeah, as I already mentioned in #319 I think that the superscript |
When this is updated and merged this guide will ✨ |
Thanks for the pointer! I was experimenting with some linking tactics -- my only light concern with linking at the end was that you'd end up on the last of a multiline bullet. But, I can't figure any other way while retaining any kind of sane formatting. |
@todb-r7 Check out the second approach I suggested in #319:
Basically, I suggested putting the anchor itself at the start of the bullet while still putting the link at the end. |
I'm implementing the end of line anchors now. |
@bbatsov what do you think? |
Incidentally, I profess my love for your work on our company blog. Thanks! |
Updated the description to reflect the current state of the PR. |
Looks good to me. Squash all the commits into one and we'll be good to go. |
I just checked @todb-r7's branch and I found:
Btw fantastic job 👍 |
I'll fix the problems described by @bruno- but just out of curiosity, would you like me to squash commits and force push, or open another branch? I can do either (personally I don't care about lots of small changes and backtracks, but I'm not a heavy |
Squash and force push. |
Adds deep links to the end of every bullet. Squashed commit of the following: commit d9805da Author: Tod Beardsley <todb@metasploit.com> Date: Fri Jul 18 10:57:50 2014 -0500 Fix problems spotted by @bruno- commit 84e3091 Merge: f0bb833 4038e21 Author: Tod Beardsley <todb@metasploit.com> Date: Thu Jul 17 16:52:47 2014 -0500 Merge branch 'findable-anchors' into add-anchors This adds the ending `[link]` tags to the first paragraph of every bullet point. It's a fairly pleasant format. commit 4038e21 Author: Tod Beardsley <todb@metasploit.com> Date: Thu Jul 17 16:51:47 2014 -0500 Remove trailing whitespace. commit 00137fc Author: Tod Beardsley <todb@metasploit.com> Date: Thu Jul 17 16:49:40 2014 -0500 Rejoin the bullets so they'll render right commit b76cb0c Author: Tod Beardsley <todb@metasploit.com> Date: Thu Jul 17 16:46:54 2014 -0500 Justify the paragraphs of bullets to 78 cols commit f35675d Author: Tod Beardsley <todb@metasploit.com> Date: Thu Jul 17 16:19:38 2014 -0500 Add trailing link buttons. This also reformats every line to be one long line. That will want to get fixed next, but this made a quick macro substitution for every anchor easier. commit 154f7dd Author: Tod Beardsley <todb@metasploit.com> Date: Thu Jul 17 15:51:45 2014 -0500 Trying with line breaks. commit f0bb833 Author: Tod Beardsley <todb@metasploit.com> Date: Tue Jul 15 16:44:32 2014 -0500 The rest of the anchors Yay now we can navigate this thing. commit aeb8444 Author: Tod Beardsley <todb@metasploit.com> Date: Tue Jul 15 15:42:01 2014 -0500 Whoopsed a newline commit 6398955 Author: Tod Beardsley <todb@metasploit.com> Date: Tue Jul 15 15:39:50 2014 -0500 First set of name anchors This adds a bunch of blank name anchors and fills in the Source Code Layout secion. Reformatting line lengths will come later.
Man I can't just force push i always do this delete and re-push dance so I'm sure. I can't do it! |
But commit 4bd7012 is up, as well as the original set of commits, now at https://github.com/rapid7/ruby-style-guide/tree/nonsquashed-add-anchors (for future readability until I toss that branch). |
No need to preserved the complete commit history. For most people it'd be best of the commit message was simple |
Ah gotcha. |
This adds subtle and nonugly link markup to every bulleted rule for ease of deeplinking.
Rewriting history always creeps me out, I'm always afraid I'm going to sleep with my grandmother. |
👍 Great work! (if you're into Rails feel free to update the companion guide as well :-) )
I'm sensing a Futurama reference here. :-) |
So much win here guys 👍 |
Yeah sure. It looks to be about the same length. Thanks! |
👍 Awesome! |
This is very similiar to the formatting used in rubocop/ruby-style-guide#338 and was requested by @bbatsov to be applied to this Rails guide as well. Much easier the second time around. :)
Add anchors to bullets
Add anchors to bullets
This is very similiar to the formatting used in rubocop/ruby-style-guide#338 and was requested by @bbatsov to be applied to this Rails guide as well. Much easier the second time around. :)
This is very similiar to the formatting used in rubocop/ruby-style-guide#338 and was requested by @bbatsov to be applied to this Rails guide as well. Much easier the second time around. :)
Every bullet is anchored with a short
<a name>
tag and includes a superscriptlink
anchor at the end. This makes life easier for me when I want to refer people to a particular guideline, such as:https://github.com/rapid7/ruby-style-guide/blob/add-anchors/README.md#no-and-or-or
When dealing with new Rubyists and their contributions to my project, I want to drop them exactly on what rule I'm talking about when they don't know about the Ruby Style Guide, instead of telling them to scroll around or ctrl-F or anything like that.
This PR implements many of the suggestions in #319.