Skip to content
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

Empty string enum value breaks ReSpec #372

Closed
luser opened this issue Dec 12, 2014 · 3 comments · Fixed by #376
Closed

Empty string enum value breaks ReSpec #372

luser opened this issue Dec 12, 2014 · 3 comments · Fixed by #376

Comments

@luser
Copy link
Contributor

luser commented Dec 12, 2014

WebIDL enums can have the empty string as a valid enumeration value, but ReSpec breaks on this (I think when it tries to assign the id based on the value). Simple example:

<dl title='enum Test' class='idl'>
  <dt></dt><dd>empty</dd>
  <dt>a</dt><dd>a</dd>
</dl>

I assume this needs to be fixed right around here:
https://github.com/w3c/respec/blob/develop/js/core/webidl-oldschool.js#L413

@marcoscaceres
Copy link
Member

@iUser, just out of interest, which spec is using an empty enum?

@luser
Copy link
Contributor Author

luser commented Dec 13, 2014

It's in Gamepad:
https://dvcs.w3.org/hg/gamepad/file/9a7e1a55d2a6/gamepad.html#l332

We had an attribute that was a string value, but I changed it to be an enum, and one of the existing string values was the empty string.

@marcoscaceres
Copy link
Member

@luser, thanks!

shikhar-scs pushed a commit to shikhar-scs/respec that referenced this issue Feb 19, 2018
shikhar-scs pushed a commit to shikhar-scs/respec that referenced this issue Feb 19, 2018
shikhar-scs pushed a commit to shikhar-scs/respec that referenced this issue Feb 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants