'use strict';

var chalk = require('chalk');

var dates    = require('../common/dates');
var releases = require('../common/releases');

var sectionsColors = {
  added:      chalk.green,
  changed:    chalk.yellow,
  deprecated: chalk.gray,
  removed:    chalk.red,
  fixed:      chalk.cyan,
  security:   chalk.magenta
};

var current = null;

module.exports = {
  release: function (release, date) {
    return chalk.bold(release === releases.UNRELEASED ? release : 'v' + release + ' - ' + dates.format(date));
  },
  section: function (section) {
    current = section.toLowerCase();

    return sectionsColors[current]('  ' + section + ':');
  },
  message: function (message) {
    return sectionsColors[current]('    - ') + message;
  }
};

@@ -8,16 +8,50 @@
 rict';%0A%0A
+/**%0A * @module format/pretty%0A */%0A%0A
 var chal
@@ -390,16 +390,266 @@
 rts = %7B%0A
+  /**%0A   * Format a release number and date with in a pretty format.%0A   *%0A   * @param  %7Bstring%7D release - Release number (semver version or 'UNRELEASED')%0A   * @param  %7BDate%7D   date    - Release date%0A   * @return %7Bstring%7D Formatted release line%0A   */%0A
   releas
@@ -793,16 +793,130 @@
 ));%0A  %7D,
+%0A%0A  /**%0A   * Format a section name with in a pretty format.%0A   *%0A   * @param %7Bstring%7D section - Section name%0A   */
 %0A  secti
@@ -1036,20 +1036,194 @@
 + ':');%0A
-
   %7D,
+%0A%0A  /**%0A   * Format a changelog message in a pretty format.%0A   *%0A   * @param  %7Bstring%7D message - The changelog message%0A   * @return %7Bstring%7D Formatted changelog message%0A   */
 %0A  messa

Add JSDoc in format/pretty