Closed
Description
Problem
The macro parser doesn't correctly handle errors in HTML fragments.
Steps To Reproduce
Steps to reproduce the behavior:
- Put the following into a
html!
invocation:html! { <key="key" key="key"> <div>{ "Hello World!" }</div> </> };
- Attempt to compile the code
- See that the error you get is "error: unexpected token"
Expected behavior
If you look at the code in yew-macro\src\html_tree\html_list.rs
,
yew/yew-macro/src/html_tree/html_list.rs
Lines 148 to 156 in 9aff041
the intended error message here is clearly meant to be
Only a single key element is allowed on a <></>
Environment:
- Yew version: master
- Rust version: 1.44
Questionnaire
- I'm interested in fixing this myself but don't know where to start
- I would like to fix and I have a solution
- I don't have time to fix this right now, but maybe later