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

Bump the minor-changes group with 1 update #94

Merged
merged 2 commits into from
Nov 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 6 additions & 10 deletions src/svg/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ mod tests {

#[test]
fn scope_helper_basics() {
let template = r#"{{#scope test_var=1}}Test var is: {{test_var}}{{/scope}}"#;
let template = "{{#scope test_var=1}}Test var is: {{test_var}}{{/scope}}";
let mut handlebars = Handlebars::new();
handlebars.set_strict_mode(true);
handlebars.register_helper("scope", Box::new(ScopeHelper));
Expand Down Expand Up @@ -496,7 +496,7 @@ mod tests {

#[test]
fn add_helper_basics() {
let template = r#"{{add 1 2 5}}"#;
let template = "{{add 1 2 5}}";
let mut handlebars = Handlebars::new();
handlebars.set_strict_mode(true);
handlebars.register_helper("add", Box::new(OpsHelper::Add));
Expand All @@ -506,7 +506,7 @@ mod tests {

#[test]
fn add_with_scope_var() {
let template = r#"
let template = "
{{#scope lines=0 margins=0}}
{{#each values}}
{{lines set=(add (lines) input.line_count output.line_count)}}
Expand All @@ -518,7 +518,7 @@ mod tests {
{{/each}}
{{lines}}, {{margins}}
{{/scope}}
"#;
";

let mut handlebars = Handlebars::new();
handlebars.set_strict_mode(true);
Expand Down Expand Up @@ -626,9 +626,7 @@ mod tests {

#[test]
fn line_splitter() {
let template = r#"
{{#each (split_lines text)}}{{this}}<br/>{{/each}}
"#;
let template = "{{#each (split_lines text)}}{{this}}<br/>{{/each}}";
let text = "test\nother test";

let mut handlebars = Handlebars::new();
Expand All @@ -646,9 +644,7 @@ mod tests {

#[test]
fn range_helper_with_each_block() {
let template = r#"
{{#each (range 0 4)}}{{@index}}: {{lookup ../xs @index}}, {{/each}}
"#;
let template = "{{#each (range 0 4)}}{{@index}}: {{lookup ../xs @index}}, {{/each}}";

let mut handlebars = Handlebars::new();
handlebars.set_strict_mode(true);
Expand Down