From bba24cc8f384dfca72d44b8174db4bd074b4f658 Mon Sep 17 00:00:00 2001 From: Christopher Homberger Date: Sat, 7 Dec 2024 16:36:15 +0100 Subject: [PATCH] fix fast semantic tokens --- src/Sdk/AzurePipelines/AzureDevops.cs | 2 +- src/Sdk/DTObjectTemplating/ObjectTemplating/TemplateReader.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Sdk/AzurePipelines/AzureDevops.cs b/src/Sdk/AzurePipelines/AzureDevops.cs index 8a4364cde6f..8ed6971f3a2 100644 --- a/src/Sdk/AzurePipelines/AzureDevops.cs +++ b/src/Sdk/AzurePipelines/AzureDevops.cs @@ -632,7 +632,7 @@ public static string RelativeTo(string cwd, string filename) { private static ((int, int)[], Dictionary<(int, int), int>) CreateIdxMapping(TemplateToken token) { if(token is LiteralToken lit && lit.RawData != null) { #if HAVE_YAML_DOTNET_FORK - var praw = lit.ToString(); + var praw = lit.RawData; YamlDotNet.Core.Tokens.Scalar found = null; var scanner = new YamlDotNet.Core.Scanner(new StringReader(praw), true); diff --git a/src/Sdk/DTObjectTemplating/ObjectTemplating/TemplateReader.cs b/src/Sdk/DTObjectTemplating/ObjectTemplating/TemplateReader.cs index c83f5b64da1..8e4fa2095c1 100644 --- a/src/Sdk/DTObjectTemplating/ObjectTemplating/TemplateReader.cs +++ b/src/Sdk/DTObjectTemplating/ObjectTemplating/TemplateReader.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.Linq; @@ -610,7 +610,7 @@ private ScalarToken ParseScalar( } if(lit.RawData != null) { #if HAVE_YAML_DOTNET_FORK - var praw = lit.ToString(); + var praw = lit.RawData; YamlDotNet.Core.Tokens.Scalar found = null; var scanner = new YamlDotNet.Core.Scanner(new StringReader(praw), true);