Skip to content

Commit

Permalink
fix(changelog): updated templates to address markdownlint issues MD03…
Browse files Browse the repository at this point in the history
…2 and MD022

Refs: #20
  • Loading branch information
da-moon authored and hdevalke committed Aug 26, 2021
1 parent 91b5b72 commit 1a87e67
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/conventional/changelog/header.hbs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

{{#if isPatch}}###{{else}}##{{/if}} {{#if @root.linkCompare}}[{{version}}]({{compareUrlFormat}}){{else}} {{version}}{{/if}}{{#if title}} "{{title}}"{{/if}}{{#if date}} ({{date}}){{/if}}
{{#if isPatch}}###{{else}}##{{/if}}{{#if @root.linkCompare}} [{{version}}]({{compareUrlFormat}}){{else}} {{version}}{{/if}}{{#if title}} "{{title}}"{{/if}}{{#if date}} ({{date}}){{/if}}
14 changes: 6 additions & 8 deletions src/conventional/changelog/template.hbs
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
{{> header}}
{{#if noteGroups}}
{{#each noteGroups}}
{{#if noteGroups}}{{#each noteGroups}}
### ⚠ ||{{title}}||

### ⚠ {{title}}

{{#each notes}}
* {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}}
{{/each}}
{{#each notes}}* {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}}{{/each}}
{{/each}}
{{/if}}

{{#each commitGroups}}
{{#if title}}{{#if @root.isPatch}}####{{else}}###{{/if}} {{title}}{{/if}}
{{#if title}}{{#if @root.isPatch}}
####{{else}}
###{{/if}} {{title}}{{/if}}

{{#each commits}}
{{> commit root=@root}}
Expand Down
4 changes: 2 additions & 2 deletions src/conventional/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl Default for Config {
}

fn default_header() -> String {
"# Changelog\n\n".into()
"# Changelog\n".into()
}

fn default_types() -> Vec<Type> {
Expand Down Expand Up @@ -255,7 +255,7 @@ mod tests {
assert_eq!(
value,
Config {
header: "# Changelog\n\n".to_string(),
header: "# Changelog\n".to_string(),
types: vec![
Type {
r#type: "chore".into(),
Expand Down

0 comments on commit 1a87e67

Please sign in to comment.