Skip to content

Commit

Permalink
Fixed issue with Markdown processing of overridden examples.
Browse files Browse the repository at this point in the history
The `example` tag can be an array when the API docs for a method are
overridden by another class. To handle this case we loop over the value
_again_ if its an array or object.
  • Loading branch information
ericf committed Mar 12, 2012
1 parent 8b1c702 commit 47a7666
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,8 @@ YUI.add('doc-builder', function(Y) {
if (k === 'description' || k === 'example') {
if (k1 === 'return') {
o[k1][k] = markdown(v, true, self.defaultReturnTags);
} else if (v.forEach || (v instanceof Object)) {
o[k1][k] = self.augmentData(v);
} else {
o[k1][k] = markdown(v, true, self.defaultTags);
}
Expand Down

0 comments on commit 47a7666

Please sign in to comment.