diff --git a/README.md b/README.md index 5ad10be..ccd9920 100644 --- a/README.md +++ b/README.md @@ -158,8 +158,7 @@ The default value for `transform` flag is `noop` which means no transformation w If a prefix is provided via the `trimprefix` flag, it will be trimmed from the start of each name (before it is transformed). If a name doesn't have the prefix it will be passed unchanged. -If a prefix is provided via the `addprefix` flag, it will be added to the start of each name (before -it is transformed and after trimming). +If a prefix is provided via the `addprefix` flag, it will be added to the start of each name (after trimming and after transforming). ## Inspiring projects diff --git a/stringer.go b/stringer.go index d194a8b..62a7725 100644 --- a/stringer.go +++ b/stringer.go @@ -330,10 +330,10 @@ func (g *Generator) generate(typeName string, includeJSON, includeYAML, includeS g.trimValueNames(values, trimPrefix) - g.prefixValueNames(values, addPrefix) - g.transformValueNames(values, transformMethod) + g.prefixValueNames(values, addPrefix) + runs := splitIntoRuns(values) // The decision of which pattern to use depends on the number of // runs in the numbers. If there's only one, it's easy. For more than