Closed reitermarkus closed 4 months ago
A similar issue occurs with multi-line strings containing #
, e.g.
<<~EOS
# Not a Comment
EOS
And another issue, cause by the shebang line and a ruby: Ruby
rule.
#!/usr/bin/env ruby
And yet another issue, also with the ruby: Ruby
rule, caused by a regex being treated as a comment:
%r{https://example\.org/#compatibility-with-ruby-mri\.},
All of these issues are a product of trying to identify comments using only regex. This is (obviously) not the right way to do this.
I have two branches currently exploring other solutions, tree-sitter
and chroma
, so this will eventually be fixed.
These issues should be fixed now on the v3
branch, if you'd like to try it out.
Check for existing issues
Environment
Using the Ruby format, strings with interpolation are treated as comments.
macOS/Homebrew/3.4.1
Describe the bug / provide steps to reproduce it
Running
vale
with the style ruleon a Ruby file containing
results in