-
Notifications
You must be signed in to change notification settings - Fork 56
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
[BUG] Quotes in Tremplate are not rendered correctly ->'
is rendered to '
#145
Comments
'
is rendered to '
I cannot reproduce, both rendering |
Here is a example: This is the template:
The template struct: #[derive(TemplateOnce)]
#[template(path = "example.stpl")]
pub struct Example<'a> {
pub text: &'a str,
} and the creation code of the template with print (in prod this would be written to a file): let example = Example {
text: "git commit -am 'formatted and clippy'",
};
println!("{}", example.render_once().unwrap()); The console output is:
|
This is expected behavior as <%= %> sanitizes the input, please try using <%- %> instead. note the - instead of the = |
thanks, it´s working now |
I have a template for a github action. In this action I trigger a git commit via:
git commit -am "<commit name>"
But if I render no error occur, but it´s not correctly rendered:
git commit -am &#039;<commit name>&#039;
I tried to use
'
or\'
in my String. But it´s still not generating the'
character arround the commit message.The text was updated successfully, but these errors were encountered: