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

No offense for code with unclosed backtick #26

Closed
Earlopain opened this issue Nov 24, 2023 · 5 comments
Closed

No offense for code with unclosed backtick #26

Earlopain opened this issue Nov 24, 2023 · 5 comments

Comments

@Earlopain
Copy link
Contributor

Examining a file which just contains the character ` is a Lint/Syntax offense for rubocop, but the same thing in a ruby codeblock passes.

This isn't just a hypothetical problem, I have come across code like the following where the backtick was inserted in place of a space for some reason. This produces no offense:

a =`do_something

Subsequent codeblocks are not/wrongly being linted, this in a following codeblock produces no offense as well:

do_something("foo")
do_something_else('bar')
@palkan
Copy link
Collaborator

palkan commented Nov 27, 2023

Do you have WarnInvalid set to true? (It's the default value) https://github.com/rubocop/rubocop-md#configuration

Could you please provide a full Markdown snippet and your RuboCop Markdown configuration?

@Earlopain
Copy link
Contributor Author

Yes, of course. I've uploaded the sample code as an attachment since I don't know how to properly escape the syntax here:

require:
  - rubocop-md

AllCops:
  NewCops: enable

test.md

@Earlopain
Copy link
Contributor Author

Looking at the processed source it's pretty clear what's going on. I was trying to give this a shot myself but don't know how to resolve this unfortunatly.

image

@palkan palkan closed this as completed in e7d2bfe Dec 1, 2023
@palkan
Copy link
Collaborator

palkan commented Dec 1, 2023

Thanks for helping with investigation. Fixed and released in 1.2.2.

@palkan palkan removed the question label Dec 1, 2023
@Earlopain
Copy link
Contributor Author

Thanks!

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

No branches or pull requests

2 participants