-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to parse selectors with numeric values in exponential notation #1155
Comments
additionally... import * as React from 'react';
import { shallow } from 'enzyme';
test('Failed to parse selector: #0', () => {
const Test = () => (<div id="0">text</div>);
const test = shallow(<Test/>);
test.find('#0');
}); this Jest test code tells me 'Failed to parse selector: #0'. |
@masataka-kurihara that's because "0" is an invalid ID. IDs can not start with numbers. |
Thx, @ljharb . Oh, I usually do with wrong way but this can run under v2. |
Then that's a bug in v2 that v3 fixes :-) |
Sounds good. If you can, I want to tell me by the message how I am wrong. |
That's a much harder problem (for a parser to know why your unpsrseable thing is wrong) - I don't think that's going to be practical here. |
No problem, I think it for another one. I have understood. Thank you for your kindness. |
I encountered the same problem and found the reason here, thanks for explaining/pointing it out.
|
Thanks - I believe you're right, and that I was incorrect. I also think that this is now fixed :-) Please file a new issue if not. |
The parser will fail if you try to do
[val=2e8]
because it doesn't recognizee
as a valid character for numeric constants. I'll work on a fix for rst-selector-parserThe text was updated successfully, but these errors were encountered: