Skip to content
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

[Implement #3379] Add table of contents at the beginning of HTML formatted output #3472

Merged
merged 1 commit into from Sep 5, 2016

Conversation

hedgesky
Copy link
Contributor

@hedgesky hedgesky commented Sep 4, 2016

This PR implements #3379: now the list of offended files with links to them is generated at the beginning of HTML formatted output, giving us ability to quickly navigate to a particular place. As a nice side effect, now it's easy to craft a link to a certain place in report. It could be handy in some situations.

@@ -70,14 +70,13 @@
line-height: 2.2rem;
margin: 0 0 0.5em;
}
.information .infobox ul {
Copy link
Contributor Author

@hedgesky hedgesky Sep 4, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This style section was unused (there were no lists in .information .infobox), so I removed it. Behavior of changing headers while scrolling practically didn't change.

@bbatsov
Copy link
Collaborator

bbatsov commented Sep 4, 2016

Can you attach a screenshot of the new functionality?

@hedgesky
Copy link
Contributor Author

hedgesky commented Sep 5, 2016

Sure.
2016-09-05 12 33 56

After clicking on a link:
2016-09-05 12 33 25

Also, you may notice that anchor part pattern is "offense_#{path_to_offended_file}". I decided to use a prefix to avoid probability of clashing ids (which is low, but anyway).

@bbatsov bbatsov merged commit 6f66c29 into rubocop:master Sep 5, 2016
@hedgesky hedgesky deleted the 3379_add_toc_to_html_formatter branch September 5, 2016 16:46
Neodelf pushed a commit to Neodelf/rubocop that referenced this pull request Oct 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants