Permalink
Browse files

remove implicit titles. Closes #70

  • Loading branch information...
1 parent 6a51108 commit d18737adaf9f71b3b9e3c88a915d2d9697d47789 @tj committed Nov 9, 2012
Showing with 6 additions and 7 deletions.
  1. +1 −1 lib/dox.js
  2. +1 −1 test/dox.test.js
  3. +1 −1 test/fixtures/b.js
  4. +1 −1 test/fixtures/c.js
  5. +2 −3 test/fixtures/titles.js
View
@@ -122,7 +122,7 @@ exports.parseComment = function(str, options) {
, description = {};
// parse comment body
- description.full = str.split('\n@')[0].replace(/^([A-Z][\w ]+):$/gm, '## $1');
+ description.full = str.split('\n@')[0];
description.summary = description.full.split('\n\n')[0];
description.body = description.full.split('\n\n').slice(1).join('\n\n');
comment.description = description;
View
@@ -161,7 +161,7 @@ module.exports = {
var comments = dox.parseComments(str);
comments[0].description.body.should.include('<h2>Some examples</h2>');
comments[0].description.body.should.not.include('<h2>for example</h2>');
- comments[0].description.body.should.include('<p>Some longer thing<br />for example:</p>');
+ comments[0].description.body.should.include('<h2>Some longer thing for example</h2>');
done();
});
},
View
@@ -11,7 +11,7 @@ exports.version = '0.0.1';
/**
* Parse the given `str`.
*
- * Examples:
+ * ## Examples
*
* parse(str)
* // => "wahoo"
View
@@ -75,7 +75,7 @@ exports.parseComments = function(js){
/**
* Parse the given comment `str`.
*
- * The comment object returned contains the following:
+ * ## The comment object returned contains the following
*
* - `tags` array of tag objects
* - `description` the first line of the comment
View
@@ -2,12 +2,11 @@
/**
* Description.
*
- * Some examples:
+ * ## Some examples
*
* foo
*
- * Some longer thing
- * for example:
+ * ## Some longer thing for example
*
* bar
*

0 comments on commit d18737a

Please sign in to comment.