Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

remove implicit titles. Closes #70

  • Loading branch information...
commit d18737adaf9f71b3b9e3c88a915d2d9697d47789 1 parent 6a51108
@tj authored
View
2  lib/dox.js
@@ -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
2  test/dox.test.js
@@ -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
2  test/fixtures/b.js
@@ -11,7 +11,7 @@ exports.version = '0.0.1';
/**
* Parse the given `str`.
*
- * Examples:
+ * ## Examples
*
* parse(str)
* // => "wahoo"
View
2  test/fixtures/c.js
@@ -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
5 test/fixtures/titles.js
@@ -2,12 +2,11 @@
/**
* Description.
*
- * Some examples:
+ * ## Some examples
*
* foo
*
- * Some longer thing
- * for example:
+ * ## Some longer thing for example
*
* bar
*
Please sign in to comment.
Something went wrong with that request. Please try again.