Closed AljoschaMeyer closed 2 years ago
My understanding is that parsers should not care about which formats are "standard" and which aren't. That is of the main differences between Microformats 1 and 2 – that in Microformats 1 parsers needed to know about all standards to be able to parse whereas in Microformats 2 parsers can parse all standards without any specific knowledge of a specific one.
There probably should be tests in the suite for only parsing lowercase-alpha; we recently added a fix and tests for that in the PHP parser, indieweb/php-mf2.
Outside of that, I think it's generally a feature that it parses anything matching the pattern. It allows experimental mf2 like p-x-whatever
without updating the parsing spec.
I believe this issue has been addressed as of microformats/tests#110 (which was merged to master
today).
The parsing specification is vague about handling non-standard formats, e.g.
<div class="h-fwfkjwe">foo</div>
. Include them in the json? Ignore? Warn? Error out?The css-selectors used to describe the parsing seem to indicate that non-standard formats are valid:
and
The test suite however does not contain any examples for this and only checks well-known formats.
In any case, stating this more explicitly in the specification wouldn't hurt.