Update src/prompt.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -46,7 +46,7 @@ export function replaceTemplateVariables(
|
|||||||
text: string,
|
text: string,
|
||||||
variables: TemplateVariables
|
variables: TemplateVariables
|
||||||
): string {
|
): string {
|
||||||
return text.replace(/\{\{(\w+)\}\}/g, (match, variableName) => {
|
return text.replace(/\{\{([\w.-]+)\}\}/g, (match, variableName) => {
|
||||||
if (variableName in variables) {
|
if (variableName in variables) {
|
||||||
return variables[variableName]
|
return variables[variableName]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user