We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following should be supported 馃槩 馃槵 :
{{basic_function('hello', 'world') }} {{basic_function('hello', 'world') }} {{basic_function( 'hello', 'world') }} {{basic_function('hello', 'world',) }}
{{basic_function('hello', 'world') }} {{basic_function('hello', 'world') }} {{basic_function( 'hello', 'world') }} {{basic_function('hello', 'world',) }}"#,
Test Replication:
fn basic_function(_state: &State, arg_one: String, arg_two: String) -> Result<Value, Error> { Ok(Value::from(format!("{} {}", arg_one, arg_two))) } #[test] fn test_functions() { let mut env = Environment::new(); env.add_function("basic_function", basic_function); env.add_template( "demo.html", r#" {{basic_function('hello', 'world') }} {{basic_function('hello', 'world') }} {{basic_function( 'hello', 'world') }} {{basic_function('hello', 'world',) }}"#, ) .unwrap(); let tmpl = env.get_template("demo.html").unwrap(); insta::assert_debug_snapshot!(tmpl.render(&()).unwrap()); }
Right now it throws this:
thread 'test_functions' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: SyntaxError, detail: Some("unexpected `)`"), name: Some("demo.html"), lineno: 8, source: None }
Not sure if it should be supported for backwards compatibility or not..
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Description
The following should be supported 馃槩 馃槵 :
Test Replication:
Right now it throws this:
Not sure if it should be supported for backwards compatibility or not..
The text was updated successfully, but these errors were encountered: