@gravitystorm commented on this pull request.
> + " ",
+ " ",
+ " ",
I don't think so. The regexp is running against the erb source code, and so the
`/\s/` removes all spaces from the source code. But if the source code contains
the literal 6-character sequence ` ` then it will ignore that sequence.
Anyway, all this code is copy-pasted from
https://github.com/Shopify/erb_lint/blob/52b6a4df2f83e4cff18738dea2c5b4bf2f59f086/lib/erb_lint/linters/hard_coded_string.rb
. I changed the class to inherit from the original i.e. `class
CustomHardCodedString < HardCodedString` and then removed everything I could
without breaking it. Ideally our linter would just be something like:
```ruby
class CustomHardCodedString < HardCodedString
NO_TRANSLATION_NEEDED << "·"
end
```
...but I couldn't quite figure out how to get it that minimal! So we end up
with the constant in full, plus our one-line addition, plus one method that
couldn't be inherited cleanly and the `include` without which it breaks too.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6686#discussion_r2669738786
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/6686/review/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev