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

Include statement has no effect when used from a block fragment #1063

Closed
OscartGiles opened this issue Jun 11, 2024 · 7 comments · Fixed by #1093
Closed

Include statement has no effect when used from a block fragment #1063

OscartGiles opened this issue Jun 11, 2024 · 7 comments · Fixed by #1093

Comments

@OscartGiles
Copy link
Contributor

When using a block fragment include statements don't seem to work.

See OscartGiles@74162b9 for an example.

Is this intented behaviour or a bug?

@djc
Copy link
Owner

djc commented Jun 12, 2024

Do you get an error? What's the behavior you're seeing and how does it differ from the expected behavior?

@OscartGiles
Copy link
Contributor Author

Yes sorry, the test fails with:

running 1 test
thread 'test_fragment_include' panicked at testing/tests/block_fragments.rs:116:5:
assertion `left == right` failed
  left: "\n\n"
 right: "\nINCLUDED: world\n"
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
test test_fragment_include ... FAILED

failures:

failures:
    test_fragment_include

I was testing out block fragments for a project and had this issue. I was able to reproduce with this test.

Askama is awesome by the way! Really enjoying working with it.

@djc
Copy link
Owner

djc commented Jun 13, 2024

Can you try if it works with #1054?

@OscartGiles
Copy link
Contributor Author

I merged that in and it still doesn't work.

@GuillaumeGomez
Copy link
Contributor

Can you provide the template source code please? It'll be useful to add it as a regression test as well.

@OscartGiles
Copy link
Contributor Author

I've just created a PR with the failing test #1066

@GuillaumeGomez
Copy link
Contributor

Thanks!

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

Successfully merging a pull request may close this issue.

3 participants