-
-
Notifications
You must be signed in to change notification settings - Fork 223
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
Unwanted whitespace in match arm #397
Labels
Comments
I'm wondering where the whitespace between the In short: {% match ... %}[this whitespace]{% when ... %} Should it result in: match ... {
Some(_) => {
writer.write_str("[this whitespace]")?; or writer.write_str("[this whitespace]")?;
match ... { @djc? |
Maybe we should just skip it always? I don't think there's really a natural place for it to go. |
vallentin
added a commit
to vallentin/askama
that referenced
this issue
Dec 12, 2020
vallentin
added a commit
that referenced
this issue
Dec 12, 2020
* Fixed #397 * Updated parser to ignore whitespace between match and when * Updated test cases * Updated Python script to generate match ws tests * Added match ws tests * Resolved rustfmt lint
vallentin
added a commit
to vallentin/askama
that referenced
this issue
Dec 13, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For a Template struct containing a field
ver: Option<&'a str>
and the following template:This code is part of the first match arm:
writer.write_str("\n ")?;
. However, since every line ends with-%}
, there should't be any newlines inserted into this part of the template.The text was updated successfully, but these errors were encountered: