From 4cb53a2b39fc1d270a305c703f047662a88578ba Mon Sep 17 00:00:00 2001 From: Edward Cooke Date: Mon, 21 Aug 2023 21:18:27 -0600 Subject: [PATCH] Set IsKey on quoted scalar keys --- YamlDotNet/Core/Scanner.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/YamlDotNet/Core/Scanner.cs b/YamlDotNet/Core/Scanner.cs index 1ba45ceb..6d0138a9 100644 --- a/YamlDotNet/Core/Scanner.cs +++ b/YamlDotNet/Core/Scanner.cs @@ -1785,9 +1785,10 @@ private void FetchQuotedScalar(bool isSingleQuoted) flowScalarFetched = flowLevel > 0; // Create the SCALAR token and append it to the queue. + var scalar = ScanFlowScalar(isSingleQuoted); - tokens.Enqueue(ScanFlowScalar(isSingleQuoted)); - + tokens.Enqueue(scalar); + lastScalar = scalar; // Check if there is a comment subsequently after double-quoted scalar without space. if (!isSingleQuoted && analyzer.Check('#')) @@ -1801,7 +1802,7 @@ private void FetchQuotedScalar(bool isSingleQuoted) /// Scan a quoted scalar. /// - private Token ScanFlowScalar(bool isSingleQuoted) + private Scalar ScanFlowScalar(bool isSingleQuoted) { // Eat the left quote.