8000 Template parse error with newline character · Issue #67 · kaj/ructe · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Template parse error with newline character #67

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

Closed
Aunmag opened this issue Jan 12, 2020 · 1 comment · Fixed by #69
Closed

Template parse error with newline character #67

Aunmag opened this issue Jan 12, 2020 · 1 comment · Fixed by #69
Labels

Comments

@Aunmag
Copy link
Aunmag commented Jan 12, 2020

Can't compile this simple template:

@()
@("1\n2\n3")

It says:

warning: Template parse error in "templates\\test.rs.html":
warning:    2:@("1\n2\n3")
warning:      ^ Error in expression starting here:

How can I write a string with a new line character?

rustc 1.39.0 (4560ea788 2019-11-04)
cargo 1.39.0 (1c6ec66d5 2019-09-30)
ructe 0.9.0

@kaj
Copy link
Owner
kaj commented Jan 16, 2020

Yes, that's a bug. Thank you for the report! Everything rust accepts in a string should be accepted by ructe as well.

I'll fix.

@kaj kaj added the bug label Jan 16, 2020
kaj added a commit that referenced this issue Jan 17, 2020
Fix #67.  Anyting that is allowed in a string in Rust should be
allowed in a string in ructe.
@kaj kaj closed this as completed in #69 Jan 18, 2020
kaj added a commit that referenced this issue Jan 25, 2020
* PR #70, Issue #63: Add feature warp02, supportig warp 0.2.x, and add
  a name alias warp01 for the old warp 0.1.x feature.  Same in
  examples.
* PR #69, Issue #67: Anyting that is allowed in a string in Rust
  should be allowed in a string in ructe.
* Fix clippy complaints re statics in generated code.
* Update actix-web example to 2.0.
* Fix doctest with mime03 feature.

Thanks to @nocduro and @Aunmag for suggestions and bug reports.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0