Skip to content

Conversation

@wryk
Copy link
Contributor

@wryk wryk commented Oct 10, 2025

I encountered compilation issues with else control structure :

<textarea :if="true"></textarea><input :else/>

<textarea :if="true"></textarea><div :else
></div>

// Both throws a ViewCompilationFailed exception with syntax error, unexpected token "??"

While debugging this I found that the lexer consumes more characters than expected in the ATTRIBUTE_NAME token when handling boolean attributes followed by a self-closing tag or a non space whitespace.

My fix is correct HTML-wise as far I as know but I've never worked on a lexer before and may not have thought about a possible regression.

One existing test failed, but the expected case was inconsistent with the others attributes. I updated it and all other view tests passed.

@brendt
Copy link
Member

brendt commented Oct 11, 2025

Thanks! The failing action seems to be unrelated to your PR, I'll merge and take a look at the error myself.

@brendt brendt merged commit cd226a3 into tempestphp:main Oct 11, 2025
203 of 206 checks passed
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 this pull request may close these issues.

2 participants