Skip to content

Commit

Permalink
Fix a bug that inherited class was parsed twice (fixes yui#324)
Browse files Browse the repository at this point in the history
All descriptions and examples of inherited classes was parsed markdown
by markdown-it twice. This fixes yui#324.
  • Loading branch information
okuryu committed Apr 9, 2015
1 parent 0f27e2b commit ca544f6
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -665,11 +665,10 @@ YUI.add('doc-builder', function (Y) {
}
if (!a.description) {
a.description = ' ';
} else {
//a.description = markdown(a.description, true, self.defaultTags);
} else if (!o.extended_from) {
a.description = self.markdown(a.description);
}
if (a.example) {
if (a.example && !o.extended_from) {
a.example = self.markdown(a.example);
}
a = self.addFoundAt(a);
Expand Down Expand Up @@ -697,7 +696,7 @@ YUI.add('doc-builder', function (Y) {
}
});
} else if (k1 === 'description' || k1 === 'example') {
o[k1] = self.markdown(i);
o[k1] = o.extended_from ? i : self.markdown(i);
}
});
return o;
Expand Down Expand Up @@ -1211,7 +1210,6 @@ YUI.add('doc-builder', function (Y) {
i.paramsList.push(name);
});
}
//i.methodDescription = self._parseCode(markdown(i.description || ''));
i.methodDescription = self._parseCode(i.description);
if (i.example && i.example.length) {
if (i.example.forEach) {
Expand All @@ -1220,7 +1218,7 @@ YUI.add('doc-builder', function (Y) {
e += self._parseCode(self.markdown(v));
});
i.example = e;
} else {
} else if (!i.extended_from) {
i.example = self._parseCode(self.markdown(i.example));
}
}
Expand Down

0 comments on commit ca544f6

Please sign in to comment.