Skip to content

Commit

Permalink
fix(header): fix no <a> if options.repository provided
Browse files Browse the repository at this point in the history
Closes #26
  • Loading branch information
ajoslin committed Sep 27, 2014
1 parent 6a1c4d1 commit 7cb5cb5
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions lib/writer.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ function writeLog(commits, options, done) {
writer.end();
}

var LINK_HEADER_TPL = '%s (%s)\n\n';
var PLAIN_HEADER_TPL = '<a name="%s"></a>\n%s (%s)\n\n';
var HEADER_TPL = '<a name="%s"></a>\n%s (%s)\n\n';
var EMPTY_COMPONENT = '$$';

function Writer(stream, options) {
Expand All @@ -95,11 +94,7 @@ function Writer(stream, options) {
options.versionText(version, subtitle) :
options.patchVersionText(version, subtitle);

if (options.repository) {
stream.write(util.format(LINK_HEADER_TPL, versionText, currentDate()));
} else {
stream.write(util.format(PLAIN_HEADER_TPL, version, versionText, currentDate()));
}
stream.write(util.format(HEADER_TPL, version, versionText, currentDate()));
};

this.section = function(title, section) {
Expand Down

0 comments on commit 7cb5cb5

Please sign in to comment.