- From: Noah Levitt <notifications@github.com>
- Date: Thu, 01 Dec 2016 12:43:44 -0800
- To: whatwg/url <url@noreply.github.com>
- Message-ID: <whatwg/url/issues/167@github.com>
https://url.spec.whatwg.org/#ipv4-number-parser I think there's a bug in the spec here. **```input="0x0a"```** 1. Let R be 10. **```R = 10```** 2. If input contains at least two code points and the first two code points are either "0x" or "0X", run these substeps: 1. Set syntaxViolationFlag. 2. Remove the first two code points from input. **```input = "0a"```** 3. Set R to 16. **```R = 16```** 3. If input is the empty string, return zero. 4. Otherwise, if input contains at least two code points and the first code point is "0", run these substeps: _**we follow this code path**_ 1. Set syntaxViolationFlag. 2. Remove the first code point from input. **```input = "a"```** 3. Set R to 8. **```R = 8```** 5. If input contains a code point that is not a radix-R digit, and return failure. _**return failure**_ 6. Return the mathematical integer value that is represented by input in radix-R notation, using ASCII hex digits for digits with values 0 through 15. -- 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/issues/167
Received on Thursday, 1 December 2016 20:44:22 UTC