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

Tera hangs whenever you insert a free opening brace #29

Closed
ntninja opened this issue May 2, 2016 · 7 comments
Closed

Tera hangs whenever you insert a free opening brace #29

ntninja opened this issue May 2, 2016 · 7 comments

Comments

@ntninja
Copy link

ntninja commented May 2, 2016

This hangs tera in line 5:

{% block title %}Index{% endblock title %}
{% block head %}
    {{ super() }}
    <style type="text/css">
        .important { color: #336699; }
    </style>
{% endblock head %}
{% block content %}
    <h1>Index</h1>
    <p class="important">
      Welcome to my awesome homepage.
    </p>
{% endblock content %}

Particularly the opening brace ("{") in the ".important { color: #336699; }" CSS statement, breaks the parser.

This example came straight from your front page. 😉

@Keats
Copy link
Owner

Keats commented May 3, 2016

Verry good point, didn't think of css at all

@ntninja
Copy link
Author

ntninja commented May 3, 2016

Actually I tried to use tera as a processor for Rust: I had hit the limits of macro_rules! when doing double-substitution of parts of function and impl bodies. The same applies to CSS and JavaScript as well, of course.

@Keats
Copy link
Owner

Keats commented May 4, 2016

That's fixed in master, will do release 0.1.1 with comments once #26 has landed

That's interesting, is there a repo somewhere to see how it's being used?

@miketang84
Copy link

I meet it too.

@Keats
Copy link
Owner

Keats commented May 9, 2016

Pushed 0.1.1 that should fix the issue

@miketang84
Copy link

nice work.

@Keats
Copy link
Owner

Keats commented May 12, 2016

Closing

@Keats Keats closed this as completed May 12, 2016
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

3 participants