bikeshed icon indicating copy to clipboard operation
bikeshed copied to clipboard

Suprious? warnings

Open frivoal opened this issue 4 years ago • 2 comments

The following code works, but generates warnings along the way:

<wpt title="
	This section has good overall test coverage,
	particularly through tests for [[#white-space-processing]] and subsections.

	Missing tests:
	* No test of Namimation type
	* Intrinsic (min and max) sizing tests for ''white-space/normal'' and ''nowrap''."></wpt>

The output is exactly what I'd expect, but during the build, Bikeshed emits this:

/Users/florian/Library/Python/3.7/lib/python/site-packages/html5lib/_ihatexml.py:258: DataLossWarning: Coercing non-XML name: 'white-space
  warnings.warn("Coercing non-XML name: %s" % name, DataLossWarning)
/Users/florian/Library/Python/3.7/lib/python/site-packages/html5lib/_ihatexml.py:266: DataLossWarning: Coercing non-XML name: normal'''
  warnings.warn("Coercing non-XML name: %s" % name, DataLossWarning)
/Users/florian/Library/Python/3.7/lib/python/site-packages/html5lib/_ihatexml.py:258: DataLossWarning: Coercing non-XML name: 'nowrap'''
  warnings.warn("Coercing non-XML name: %s" % name, DataLossWarning)
/Users/florian/Library/Python/3.7/lib/python/site-packages/html5lib/_ihatexml.py:266: DataLossWarning: Coercing non-XML name: 'nowrap'''
  warnings.warn("Coercing non-XML name: %s" % name, DataLossWarning)

frivoal avatar Apr 23 '21 00:04 frivoal

First, woah, that damn error finally tells you what it is that's messed up, yay!

Second, uh, that implies the HTML is getting fucked up. I'm very surprised it appears to be working. I suspect that maybe the Markdowning that happens before HTML parsing is having fun on that.

I'll investigate, but if that's the case, then we should move the title text from an attribute to a child element.

tabatkins avatar Apr 23 '21 00:04 tabatkins

Moving to a child element would seem a lot cleaner in general (and then we could remove the special processing of "lang" and "dir"), but I went with an attribute for compat with previous markup.

That said, while this does seem to indicate that something is messed up, the actual output is perfectly good, so somehow it's falling back on its feet.

frivoal avatar Apr 23 '21 00:04 frivoal