Skip to content

Commit 8e214f4

Browse files
committed
run .setParentID() later so it picks up all modifications made to memberof
1 parent b3ab283 commit 8e214f4

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

lib/transform.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ function transform (data) {
2626

2727
json = json.map(function (doclet) {
2828
doclet = setID(doclet)
29-
doclet = setParentID(doclet)
3029

3130
doclet = removeQuotes(doclet)
3231
doclet = cleanProperties(doclet)
@@ -52,6 +51,7 @@ function transform (data) {
5251
})
5352

5453
json = removeEnumChildren(json)
54+
json = json.map(setParentID)
5555
json = json.map(removeUnwanted)
5656
json = json.map(sortIdentifier)
5757

@@ -135,6 +135,7 @@ function createConstructor (class_) {
135135

136136
/* only output a constructor if it's documentated */
137137
if (constructor.description || (constructor.params && constructor.params.length)) {
138+
constructor.id = class_.id
138139
constructor.longname = class_.longname
139140
constructor.name = class_.codeName || class_.name
140141
constructor.kind = 'constructor'
@@ -188,7 +189,9 @@ function isES6Constructor (doclet) {
188189
}
189190

190191
function replaceID (id, oldID, newID) {
191-
return id.replace(new RegExp(`\b${oldID}\b`), newID)
192+
/* this is required by command-line-args which has similar class names like Definition and Definitions */
193+
// return id.replace(new RegExp(`\b${oldID}\b`), newID)
194+
return id.replace(new RegExp(`${oldID}`), newID)
192195
}
193196

194197
function updateIDReferences (doclet, newID) {

0 commit comments

Comments
 (0)