-
Notifications
You must be signed in to change notification settings - Fork 33
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
parse error with <style> tag #4
Comments
Yes. Since the curly braces are used for delimiting blocks they are not allowed unescaped in templates. Since there is nothing that would explain a block at that position, it would be possible to actually allow raw curly braces there, but the easy solution is to just escape curly brackets like so:
|
Thanks for the quick clarification! Maybe this should be mentioned in the readme - I couldn't find information on escaping there (other than HTML escaping). |
Add a section about curly brackets to the readme. Suggested by @dermetfan in #4.
Yep, it should be in the documentation (such as it is). I added a paragraph to |
Add a section about curly brackets to the readme (this was originally commited on the feature/staticfiles branch by mistake). Suggested by @dermetfan in #4.
Great, thanks! |
I decided to try ructe for a small web project.
This is a reduced sample that should suffice to reproduce the problem.
main.rs
:style.rs.html
:This results in a compilation error:
A more informative message is found in
target/debug/build/<project>/output
:The templates compiles if I remove the content of the
<style>
-tag.My guess would be that ructe is confused by the curly braces in CSS, as the error message reports an Eof parse error at the first
{
.The text was updated successfully, but these errors were encountered: