Skip to content

Trailing delimiter is discarded #8

Description

@kobruleht

On html rendering, it discards trailing delimiter ( " or ' )

Code to reproduce:

using System;
using System.Threading.Tasks;
using RazorEngineCore;

namespace SampleApp
{
    public class Program
    {
        static async Task Main(string[] args)
        {
            RazorEngine razorEngine = new RazorEngine();
            var template =
                await razorEngine.CompileAsync<RazorEngineCorePageModel>(
                    @"<img href='@(""test"")'>");
            var res = await template.RunAsync();
            // Observed: trailing ' is lost
            Console.WriteLine(res);
            Console.ReadKey();
        }
    }
}

Project:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net5.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="RazorEngineCore" Version="2021.3.1" />
    <PackageReference Include="RazorEngineCore.Extensions" Version="0.3.0" />
  </ItemGroup>

</Project>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions