speced / bikeshed

:bike: A preprocessor for anyone writing specifications that converts source files into actual specs.
https://speced.github.io/bikeshed
Creative Commons Zero v1.0 Universal
1.08k stars 199 forks source link

No error for missing end tag #905

Open zcorpan opened 7 years ago

zcorpan commented 7 years ago

In https://github.com/w3c/webvtt/pull/317 I accidentally forgot an </a> tag, but bikeshed did not complain about this at all. The generated HTML also passes conformance checking; the output is:

     with the given <a data-link-type="dfn" href="#webvtt-node-objects-applicable-classes" id="ref-for-webvtt-node-objects-applicable-classes-4">applicable classes.</a></p>
<pre><a data-link-type="dfn" href="#webvtt-node-objects-applicable-classes" id="ref-for-webvtt-node-objects-applicable-classes-5">WEBVTT

00:00:00.000 --> 00:00:08.000
&lt;c.loud>Yellow!&lt;/c>
&lt;i.loud>Yellow!&lt;/i>
&lt;u.loud>Yellow!&lt;/u>
&lt;b.loud>Yellow!&lt;/b>
&lt;u.loud>Yellow!&lt;/u>
&lt;ruby.loud>Yellow! &lt;rt.loud>Yellow!&lt;/rt>&lt;/ruby>
&lt;v.loud Kathryn>Yellow!&lt;/v>
&lt;lang.loud en>Yellow!&lt;/lang>
</a></pre>

I think bikeshed should give an error when the HTML parser gives a parse error, to catch mistakes like this.

@tabatkins

tabatkins commented 7 years ago

The HTML parser doesn't emit parse errors, to my knowledge. I'll ping gsnedders and see if there's anything I can do, as I would like to help catch markup problems like this.

tabatkins commented 7 years ago

According to gsnedders, the parser does expose parse errors, but they're not kept up-to-date with the spec. I can still try to expose them as warnings in Bikeshed. What do you think?

zcorpan commented 7 years ago

Warning is better than nothing, but why not error? If someone is annoyed about something being a non-error per spec but is an error in html5lib, we can fix html5lib.

tabatkins commented 7 years ago

Given the explicit "not maintaining that part" opinion right now, I'm not happy to make it a fatal error. If y'all decide to actively maintain it, I'll change my opinion. ^_^

zcorpan commented 7 years ago

Fair enough. :-)