Skip to content

Erroneous diagnostics for datetime formatting #118

Description

@olivierdelree

SuperHTML Version

v0.6.2

Steps to Reproduce and Observed Behavior

SuperHTML produces a (seemingly) erroneous diagnostic for datetime attributes of <time> elements.

Diagnostic:

$ superhtml check /tmp/foo.html
/tmp/foo.html:8:54: invalid value for this attribute: invalid date time separator, must be 'T' or space
   <p>The concert took place on <time datetime="2001-05-15T19:00">May 15</time>.</p>
                                                       ^

Snippet generating the diagnostic (taken from the MDN website):

<!DOCTYPE html>
<html lang="en-US">
	<head>
		<meta charset="utf-8">
		<title>SuperHTML Date Error</title>
	</head>

	<body>
		<p>The concert took place on <time datetime="2001-05-15T19:00">May 15</time>.</p>
	</body>
</html>

Expected Output according to the HTML spec

The document does not produce any error.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions