Skip to content

Commit 4d31e75

Browse files
committed
Group tags that contain a dash or underscore
1 parent e2d75c4 commit 4d31e75

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/kotlin/org/openrewrite/ListsOfRecipesWriter.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,11 @@ class ListsOfRecipesWriter(
171171
// Collect all tags and their associated recipes
172172
for (recipeDescriptor in allRecipeDescriptors) {
173173
for (tag in recipeDescriptor.tags) {
174-
tagToRecipes.computeIfAbsent(tag) { TreeSet(compareBy { it.name }) }
174+
tagToRecipes.computeIfAbsent(
175+
tag
176+
.substringBefore('-')
177+
.substringBefore('_')
178+
) { TreeSet(compareBy { it.name }) }
175179
.add(recipeDescriptor)
176180
}
177181
}

0 commit comments

Comments
 (0)