Skip to content

Commit

Permalink
Improve struct support
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhian committed Jul 11, 2022
1 parent 4eb1bd2 commit 4208229
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion builders/struct-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {
builder.push("\n");

const members = enumerable.from(node.members).select(function(x) {
return ` ${x.typeDescriptions.typeString} ${x.name}`;
return `${x.name} ${x.typeDescriptions.typeString} `;
}).toArray();

builder.push(members.join("," + "\n"));
Expand Down
2 changes: 1 addition & 1 deletion helpers/struct-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {
let linkedName = "";
if (structName.includes(".")) {
linkedName = `${structName.split(" ")[0]}`;
return `[${linkedName}](${linkedName.split('.')[0]}.md#${linkedName.split('.')[1].toLowerCase()})`;
return `[${linkedName}](${linkedName.split('.')[0].replace('[]', '')}.md#${linkedName.split('.')[1].replace('[]', '').toLowerCase()})`;
}
}
};

0 comments on commit 4208229

Please sign in to comment.