Skip to content

Commit

Permalink
fix(core): doc with subgroup potentially has a '.' in its name (#982)
Browse files Browse the repository at this point in the history
  • Loading branch information
loicmathieu authored Feb 13, 2023
1 parent 9636746 commit 090a0d2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private PluginDocumentation(RegisteredPlugin plugin) {
.type(entry.getKey());
if (cls.getPackageName().startsWith(this.group)) {
var pluginSubGroup = cls.getPackage().getDeclaredAnnotation(PluginSubGroup.class);
var subGroupName = cls.getPackageName().substring(cls.getPackageName().lastIndexOf('.') + 1);
var subGroupName = cls.getPackageName().substring(this.group.length() + 1);
var subGroupTitle = pluginSubGroup != null ? pluginSubGroup.title() : subGroupName;
var subGroupDescription = pluginSubGroup != null ? pluginSubGroup.description() : null;
// hack to avoid adding the subgroup in the task URL when it's the group to keep search engine indexes
Expand All @@ -49,7 +49,7 @@ private PluginDocumentation(RegisteredPlugin plugin) {
builder.subgroup(subgroup);
} else {
// should never occur
builder.subgroup(new SubGroup(this.group.substring(this.group.lastIndexOf('.') + 1)));
builder.subgroup(new SubGroup(""));
}

return builder.build();
Expand Down

0 comments on commit 090a0d2

Please sign in to comment.