[whatwg/url] [Editorial] Simplify the ends-in-a-number checker (#633)

<!--
Thank you for contributing to the URL Standard! Please describe the change you are making and complete the checklist below if your change is not editorial.
-->

I believe this should be functionally identical to what exists already. 

IMO it's more intuitive, because it means the "ends in a number" checker first checks to see if the label is all digits (which obviously means it is a number), and then checks to see if it's a number containing non-digit characters (i.e. just hex numbers). I think it's clearer and more obvious than the current wording, which first invokes the more expensive IPv4 number parser and then adds a second check because of particular failure conditions.

Writing it this way in the spec gives implementors assurance that this is a safe optimisation.
You can view, comment on, or merge this pull request online at:

  https://github.com/whatwg/url/pull/633

-- Commit Summary --

  * Simplify the ends-in-a-number checker

-- File Changes --

    M url.bs (11)

-- Patch Links --

https://github.com/whatwg/url/pull/633.patch
https://github.com/whatwg/url/pull/633.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/pull/633

Received on Tuesday, 24 August 2021 14:28:39 UTC