Skip to content

Commit

Permalink
fix(engine.js): make breakingBody and issuesBody affect the commit me…
Browse files Browse the repository at this point in the history
…ssage

-

fix commitizen#115
  • Loading branch information
lllllllqw committed Sep 24, 2020
1 parent 9127e30 commit 1aa967f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ var filterSubject = function(subject, disableSubjectLowerCase) {
return subject;
};

var getBody = function(answers) {
return answers.body || breakingBody || issuesBody
}

// This can be any kind of SystemJS compatible module.
// We use Commonjs here, but ES6 or AMD would do just
// fine.
Expand Down Expand Up @@ -203,7 +207,8 @@ module.exports = function(options) {
var head = answers.type + scope + ': ' + answers.subject;

// Wrap these lines at options.maxLineWidth characters
var body = answers.body ? wrap(answers.body, wrapOptions) : false;
var body = getBody(answers)
body = body ? wrap(body, wrapOptions) : false;

// Apply breaking change prefix, removing it if already present
var breaking = answers.breaking ? answers.breaking.trim() : '';
Expand Down

0 comments on commit 1aa967f

Please sign in to comment.