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

fix: handle nested HTML tags in the config #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jcgruenhage
Copy link
Contributor

This fixes #14. I'm not 100% happy with that code, but I'm not sure how to handle this better.

@@ -71,7 +71,7 @@ impl<'a> Changelog<'a> {

let mut log = tera.render("template", &context)?;
if let Some(metadata) = &self.config.metadata {
log.push_str(&format!("\n{}\n", metadata));
log.push_str(&format!("\n\n{}\n", metadata));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused here, without this the diff says one newline has been removed, but I don't see how my code removes more newlines than the old code. When explicitly adding this newline in the config parsing instead of adding it here, the diff says there's an extra newline. I'm really a bit lost here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

correctly parse custom configuration with nested HTML comments
1 participant