Skip to content

Commit 90c04f1

Browse files
authored
fix: _ is not parsed in template variable name (#920)
1 parent 6482ef2 commit 90c04f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Models/TemplateEngine.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ private string ParseReplacement()
313313

314314
private static bool IsNameChar(char c)
315315
{
316-
return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9');
316+
return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '_';
317317
}
318318

319319
// (?) notice or log if variable is not found

0 commit comments

Comments
 (0)