rubocop / rubocop-performance

An extension of RuboCop focused on code performance checks.
https://docs.rubocop.org/rubocop-performance
MIT License
670 stars 79 forks source link

Spaceship operator (`<=>`) incorrectly displays rendered as ligature `<⇒` in docs #442

Open sambostock opened 7 months ago

sambostock commented 7 months ago

This bug is with the documentation for, so I've opted not to use the template, as it doesn't really make sense.

In the documentation for Performance/RedundantSortBlock, the following snippet

Identifies places where sort { |a, b| a <=> b } can be replaced with sort.

is incorrectly rendered as a partial ligature

Identifies places where sort { |a, b| a <⇒ b } can be replaced with sort.

-sort { |a, b| a <=> b }
+sort { |a, b| a <⇒ b }

The documentation comment in the source code from which this is generated is correct.

# Identifies places where `sort { |a, b| a <=> b }` can be replaced with `sort`.

I have not checked for other occurrences, or if this affects cops outside rubocop-performance.