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

Possible partial parser bug #229

Closed
gxtaillon opened this issue Jul 3, 2021 · 5 comments
Closed

Possible partial parser bug #229

gxtaillon opened this issue Jul 3, 2021 · 5 comments

Comments

@gxtaillon
Copy link

gxtaillon commented Jul 3, 2021

Hello,

I can work around this issue but it would be very convenient to be able to declare styles to put the <head> in the same hbs file where they are used.

I'm getting a macro panick when the character '}' is present in a partial's attribute value[0]:

error: proc macro panicked
   --> src/bin/x.rs:y:z
    |
127 |         .body(auto!(ywrite_min!(String, "{{> pages/query }}"))))
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: message: called `Option::unwrap()` on a `None` value
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

Eg:

{{#> root/base style = "form textarea { box-sizing: border-box; width: 100%; max-width:1024px; }" }}
-----------------------------------------------------------------------------------------------^

Also fails with

}}
}}}
\}
\\}

System versions:

yarte 0.15.4
rustc 1.53.0 (53cb7b09b 2021-06-17)
binary: rustc
commit-hash: 53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b
commit-date: 2021-06-17
host: x86_64-unknown-linux-gnu
release: 1.53.0
LLVM version: 12.0.1

Best,

[0] https://yarte.netlify.app/templating/partial.html

@zzau13
Copy link
Owner

zzau13 commented Jul 4, 2021 via email

@zzau13
Copy link
Owner

zzau13 commented Jul 11, 2021

@gxtaillon Did this solve the problem? Any questions? Close?

@gxtaillon
Copy link
Author

Removing the # produces another error that looks like #211.

Closing since I can work around it

Thank you

@zzau13
Copy link
Owner

zzau13 commented Jul 11, 2021

You must have an error in the template. Use the derivative that does not have that bug in the error output, you can use it only to develop the templates.
I'm sorry, as you can see, I already have the issue, but I have problems with Spanish justice, these incompetent fascists don't stop fucking with me.

Soon I will be calmer and I will put full time. Thanks for use yarte

@zzau13 zzau13 reopened this Jul 12, 2021
@zzau13
Copy link
Owner

zzau13 commented Jul 18, 2021

Close in favor of #211

@zzau13 zzau13 closed this as completed Jul 18, 2021
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