Skip to content

Commit d4a914d

Browse files
committed
Fix - not recognized in $(…) syntax.
1 parent 7fc3dfa commit d4a914d

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Most lines should begin with one of these words:
77
## [Unreleased](https://github.com/sharpjs/Prequel/compare/release/1.0.3..HEAD)
88
- Change license from ISC to MIT.
99
- Add .NET 8.0 target framework.
10+
- Fix `-` not recognized in `$(…)` syntax.
1011

1112
<!--
1213
## [1.1.0](https://github.com/sharpjs/Prequel/compare/release/1.0.3..release/1.1.0)

Prequel/SqlCmdPreprocessor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ public void AppendRangeTo(StringBuilder builder, int start, int end)
444444

445445
private static readonly Regex VariableRegex = new(
446446
"""
447-
\$\( (?<name>\w+) \)
447+
\$\( (?<name> [\w-[\d]] [-\w]* ) \)
448448
""",
449449
Options
450450
);
@@ -466,7 +466,7 @@ public void AppendRangeTo(StringBuilder builder, int start, int end)
466466
"""
467467
\A [ \t]+
468468
469-
(?<name> [\w-[0-9]] [\w-]* )
469+
(?<name> [\w-[\d]] [-\w]* )
470470
471471
(?> [ \t]+
472472
(?<value> [^" \t\r\n]+ # unquoted

0 commit comments

Comments
 (0)