Replaced en-dash with hyphen for identifier equality (#6272)
This commit is contained in:
parent
82453825e9
commit
496716ee9b
1 changed files with 1 additions and 1 deletions
|
|
@ -130,7 +130,7 @@ Two identifiers are considered equal if the following algorithm returns true:
|
||||||
.. code-block:: nim
|
.. code-block:: nim
|
||||||
proc sameIdentifier(a, b: string): bool =
|
proc sameIdentifier(a, b: string): bool =
|
||||||
a[0] == b[0] and
|
a[0] == b[0] and
|
||||||
a.replace(re"_|–", "").toLower == b.replace(re"_|–", "").toLower
|
a.replace("_", "").toLower == b.replace("_", "").toLower
|
||||||
|
|
||||||
That means only the first letters are compared in a case sensitive manner. Other
|
That means only the first letters are compared in a case sensitive manner. Other
|
||||||
letters are compared case insensitively and underscores are ignored.
|
letters are compared case insensitively and underscores are ignored.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue