Skip to content

Commit

Permalink
test: add a testcase for #611 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sunng87 committed Jul 14, 2024
1 parent 5db326a commit 913784b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/whitespace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,24 @@ fn tag_before_eof_becomes_standalone_in_full_template() {
.unwrap(),
output
);

let input = r#"<ul>
{{#each a}}
{{!-- comment --}}
<li>{{this}}</li>
{{/each}}abc"#;
let output = r#"<ul>
<li>1</li>
<li>2</li>
<li>3</li>
abc"#;
let hbs = Handlebars::new();

assert_eq!(
hbs.render_template(input, &json!({"a": [1, 2, 3]}))
.unwrap(),
output
);
}

#[test]
Expand Down

0 comments on commit 913784b

Please sign in to comment.