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

if-else in html! leads to unexpected end of input #5

Closed
aDogCalledSpot opened this issue Jan 3, 2024 · 1 comment
Closed

if-else in html! leads to unexpected end of input #5

aDogCalledSpot opened this issue Jan 3, 2024 · 1 comment

Comments

@aDogCalledSpot
Copy link

aDogCalledSpot commented Jan 3, 2024

Example:

use yew::prelude::*;

#[function_component(Application)]
fn app() -> Html {
    let loading = false;
    html! {
        if loading {
            { "Loading" }
        } else {
            { "Done" }
        }
    }
}

yew-fmt shouldn't do anything here since this is already correctly formatted.

Result:

error: unexpected end of input, expected curly braces
  ┌─ /path/to/test.rs:9:9
  │
9 │         } else {
  │     
its-the-shrimp added a commit that referenced this issue Jan 12, 2024
@its-the-shrimp
Copy link
Owner

Thank you for reporting this, should be fixed in v0.2.3

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

No branches or pull requests

2 participants