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

Fix anchor if it contains two or more slashes #12994

Merged
merged 1 commit into from
Jun 14, 2024
Merged

Conversation

ksss
Copy link
Contributor

@ksss ksss commented Jun 14, 2024

Anchors are not generated correctly for cops containing two or more slashes.

For example, if you select Capybara/RSpec/PredicateMatcher from the link below, the anchor is not working.

https://github.com/rubocop/rubocop-capybara/blob/2e9e33a1feffab0c36f489387afa307a04318a66/docs/modules/ROOT/pages/cops.adoc

I have fixed it so that it does not matter how many slashes there are.


Before submitting the PR make sure the following are checked:

  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
  • Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

@ksss ksss force-pushed the cops-doc-xref branch 2 times, most recently from 73bc3ef to dc8210d Compare June 14, 2024 07:29
@@ -0,0 +1 @@
* [#12994](https://github.com/rubocop/rubocop/pull/12994): Fix anchor if it contains two or more slashes. ([@ksss][])
Copy link
Member

Choose a reason for hiding this comment

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

Changelog entry is not necessary due to internal modification. Can you remove it?

@koic koic merged commit 452ad28 into rubocop:master Jun 14, 2024
22 checks passed
@koic
Copy link
Member

koic commented Jun 14, 2024

Thanks!

@ksss ksss deleted the cops-doc-xref branch June 14, 2024 08:30
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