Code Block Markup Issue

Hello,

I think I have found an issue in the code block section. Here is the example that reproduces the issue (the code taken from https://devblogs.microsoft.com/dotnet/demystifying-retrieval-augmented-generation-with-dotnet/)

```csharp

using Microsoft.SemanticKernel;

string apikey = Environment.GetEnvironmentVariable("AI:OpenAI:APIKey")!;

// Initialize the kernel
Kernel kernel = Kernel.CreateBuilder()
   .AddOpenAIChatCompletion("gpt-3.5-turbo-0125", apikey)
   .Build();

// Create the prompt function as part of a plugin and add it to the kernel.
// These operations can be done separately, but helpers also enable doing
// them in one step.
kernel.ImportPluginFromFunctions("DateTimeHelpers",
[
   kernel.CreateFunctionFromMethod(() => $"{DateTime.UtcNow:r}", "Now", "Gets the current date and time")
]);

KernelFunction qa = kernel.CreateFunctionFromPrompt("""
   The current date and time is {{ datetimehelpers.now }}.
   {{ $input }}
   """);

// Q&A loop
var arguments = new KernelArguments();
while (true)
{
   Console.Write("Question: ");
   arguments["input"] = Console.ReadLine();
   Console.WriteLine(await qa.InvokeAsync(kernel, arguments));
   Console.WriteLine();
}

```

And as we can see this part “// Create the prompt function as part of a plugin and add it to the kernel.” appears only once in the code. However, when we publish it looks like this:

The YouTrack version I am using is 2023.3.24329 

0
3 comments

Hi,

I'm Lena from the YouTrack Team. 

Could you please send me a screenshot of the markdown of the issue? 

0

Hi,

I'm afraid, I'm not able to reproduce the problem in the testing environment. Could you please contact our support directly via this link: https://jb.gg/ytsup? We will request some additional information. 

Thank you. 

0

Please sign in to leave a comment.