Skip to content

Commit

Permalink
refactor(placeholders): use slugify for default values
Browse files Browse the repository at this point in the history
  • Loading branch information
rifont committed Nov 19, 2024
1 parent f9b2199 commit 1b8e0a7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Injectable, InternalServerErrorException } from '@nestjs/common';
import { slugify } from '@novu/shared';
import { PlaceholderAggregation } from './placeholder.aggregation';
import { HydrateEmailSchemaUseCase } from '../../../../environments-v1/usecases/output-renderers';
import { CollectPlaceholderWithDefaultsCommand } from './collect-placeholder-with-defaults.command';
Expand Down Expand Up @@ -110,7 +111,7 @@ function extractLiquidJSPlaceholders(text: string) {
} else {
matches.push({
placeholder: `{{${trimmedContent}}}`,
defaultValue,
defaultValue: slugify(defaultValue, { separator: '_' }),
});
}
}
Expand Down

0 comments on commit 1b8e0a7

Please sign in to comment.