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

Confusing definition of HTML flow type 7 #665

Closed
wooorm opened this issue Sep 17, 2020 · 1 comment · Fixed by #666
Closed

Confusing definition of HTML flow type 7 #665

wooorm opened this issue Sep 17, 2020 · 1 comment · Fixed by #666

Comments

@wooorm
Copy link
Contributor

wooorm commented Sep 17, 2020

The HTML flow type 7 (complete tag) seems to indicate with its start condition:

  1. Start condition: line begins with a complete open tag (with any tag name other than script, style, or pre) or a complete closing tag, followed only by whitespace or the end of the line.

...that the following matches:

<x> a

Because it is a full opening tag, followed by a space (which is whitespace)

cmjs doesn’t see it as such:

<p><x> a</p>

It seems that the start condition should be worded as:

  1. Start condition: line begins with a complete open tag (with any tag name other than script, style, or pre) or a complete closing tag, followed by zero or more spaces and tabs, followed by the end of the line.

Or is this a bug in implementations?

I can open a PR with an agreeable fix to the spec.

@jgm
Copy link
Member

jgm commented Sep 17, 2020

I figured that "followed only by whitespace" implies "not followed by whitespace AND a letter."
But I agree, this could be more explicit, so I'd be happy with a PR.

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.

2 participants