Skip to content

Commit 0f0fc1a

Browse files
authored
Fixed regex to quote strings with leading zeros (#667)
1 parent f2d6d3c commit 0f0fc1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/KubernetesClient/StringQuotingEmitter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class StringQuotingEmitter : ChainedEventEmitter
1111
{
1212
// Patterns from https://yaml.org/spec/1.2/spec.html#id2804356
1313
private static readonly Regex QuotedRegex =
14-
new Regex(@"^(\~|null|true|false|-?(0|[1-9][0-9]*)(\.[0-9]*)?([eE][-+]?[0-9]+)?)?$");
14+
new Regex(@"^(\~|null|true|false|-?(0|[0-9]*)(\.[0-9]*)?([eE][-+]?[0-9]+)?)?$");
1515

1616
public StringQuotingEmitter(IEventEmitter next)
1717
: base(next)

0 commit comments

Comments
 (0)