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

Wrapping assert tags around block elements? #2268

Closed
dj2 opened this issue Apr 22, 2022 · 1 comment · Fixed by #2269
Closed

Wrapping assert tags around block elements? #2268

dj2 opened this issue Apr 22, 2022 · 1 comment · Fixed by #2269

Comments

@dj2
Copy link
Contributor

dj2 commented Apr 22, 2022

In the WGSL spec we would like to start using the assert capabilities of bikeshed to annotate the spec. We started adding asserts in gpuweb/gpuweb#2783 but ran into the issue that a lot of what we'd like to assert on are bullet point lists or tables.

So, what we'd like to do is:

<assert>
* requirement 1
* requirement 2
* requirement 3
</assert>

While this generates in bikeshed, it fails the HTML validation because the <ul> element ends up embedded inside a <span>.

Is this something that could be handled in bikeshed? Possibly by doing something like generating the assert from the contents of the list, but not wrapping the list in the <span> tag in the generated content? Or something like having parent/child assert spans so the list elements have their own span ids, but they link to a parent span that covers all of them?

dj2 added a commit to dj2/bikeshed that referenced this issue Apr 22, 2022
This PR adds the ability to add `assert` to a div tag to generate the
unique assert hash for the contents of the div and then attach an
`id=assert-<hash>` to the div. This allows using the assert
functionality with larger block based pieces of spec.

Fixes speced#2268
@dj2
Copy link
Contributor Author

dj2 commented Apr 22, 2022

Thought of another, easier, possiblity which is to allow adding assert to a <div>. Then we can do <div assert> around the larger blocks while using <assert> for the smaller inline assertions. This then adds the id in the same way to the div as it would to the assert span.

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.

1 participant