Skip to content

Commit

Permalink
Improve some conditional in the builder.js
Browse files Browse the repository at this point in the history
Some conditional in the `lib/builder.js` have admit of improvement.
It'll be more readable and efficient by this changes.
  • Loading branch information
okuryu committed Dec 3, 2014
1 parent aecd078 commit ea7feb1
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions lib/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -690,20 +690,15 @@ YUI.add('doc-builder', function (Y) {
Y.each(i, function (v, k) {
if (k === 'final') {
o[k1][k] = true;
}
if (k === 'description' || k === 'example') {
if (k1 === 'return') {
o[k1][k] = self.markdown(v);
} else if (v.forEach || (v instanceof Object)) {
} else if (k === 'description' || k === 'example') {
if (v.forEach || (v instanceof Object)) {
o[k1][k] = self.augmentData(v);
} else {
//o[k1][k] = markdown(v, true, self.defaultTags);
o[k1][k] = self.markdown(v);
}
}
});
} else if (k1 === 'description' || k1 === 'example') {
//o[k1] = markdown(i, true, self.defaultTags);
o[k1] = self.markdown(i);
}
});
Expand Down

0 comments on commit ea7feb1

Please sign in to comment.