Fixed regex to quote strings with leading zeros (#667)

This commit is contained in:
JHogue-80
2021-07-22 03:05:51 +02:00
committed by GitHub
parent f2d6d3c48a
commit 0f0fc1a059

View File

@@ -11,7 +11,7 @@ namespace k8s
{ {
// Patterns from https://yaml.org/spec/1.2/spec.html#id2804356 // Patterns from https://yaml.org/spec/1.2/spec.html#id2804356
private static readonly Regex QuotedRegex = private static readonly Regex QuotedRegex =
new Regex(@"^(\~|null|true|false|-?(0|[1-9][0-9]*)(\.[0-9]*)?([eE][-+]?[0-9]+)?)?$"); new Regex(@"^(\~|null|true|false|-?(0|[0-9]*)(\.[0-9]*)?([eE][-+]?[0-9]+)?)?$");
public StringQuotingEmitter(IEventEmitter next) public StringQuotingEmitter(IEventEmitter next)
: base(next) : base(next)