Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Razor corrupts '<% %>' snippets (3.0.100) #37198

Closed
AlekseyMartynov opened this issue Nov 12, 2019 · 6 comments
Closed

Razor corrupts '<% %>' snippets (3.0.100) #37198

AlekseyMartynov opened this issue Nov 12, 2019 · 6 comments
Labels
area-razor.compiler This issue is related to the Razor compiler (now external) investigate
Milestone

Comments

@AlekseyMartynov
Copy link

We use a JavaScript template engine with 'percent tags'. In Razor files, these snippets are corrupted.

Example:

<script type="text/html">
    <% if (value == 0) { %>
        <div><%= value %></div>
    <% } %>
</script>

<template>
    <% if (value == 0) { %>
        <div><%= value %></div>
    <% } %>
</template>

<text>
    <% if (value == 0) { %>
        <div><%= value %></div>
    <% } %>
</text>

is rendered as

<script type="text/html">
    <% if (value =>
        <div><%= value %></div>
    <% } %>
</script>

<template>
    <% if (value =>
        <div><%= value %></div>
    <% } %>
</template>

<text>
    <% if (value =>
        <div><%= value %></div>
    <% } %>
</text>

Note how <% if lines are truncated.

Further technical details

.NET Core SDK (reflecting any global.json):
 Version:   3.0.100
 Commit:    04339c3a26

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.18362
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\3.0.100\
@javiercn
Copy link
Member

@AlekseyMartynov thanks for contacting us.

@ajaybhargavb can you take a look?

@allisonchou allisonchou transferred this issue from dotnet/aspnetcore Oct 1, 2021
@NTaylorMullen
Copy link
Contributor

@allisonchou this one is Razor compiler related

@allisonchou
Copy link
Contributor

Transferring back to aspnetcore repo

@allisonchou allisonchou transferred this issue from dotnet/razor Oct 1, 2021
@allisonchou allisonchou added the area-razor.compiler This issue is related to the Razor compiler (now external) label Oct 1, 2021
@mkArtakMSFT mkArtakMSFT added this to the Backlog milestone Oct 11, 2021
@ghost
Copy link

ghost commented Oct 11, 2021

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@mkArtakMSFT
Copy link
Member

Thank you for filing this issue. In order for us to investigate this issue, please provide a minimalistic repro project (ideally a GitHub repo) that illustrates the problem.

@mkArtakMSFT mkArtakMSFT added Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. and removed Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. labels Oct 11, 2021
@AlekseyMartynov
Copy link
Author

Hello @mkArtakMSFT

Thank you for the update. I checked the issue against the current versions. It is not reproduced with .NET Core 3.1 and .NET 5. The bug was specific to 3.0.x which has reached end of support.

I'm closing the ticket.

@dotnet dotnet locked as resolved and limited conversation to collaborators Nov 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-razor.compiler This issue is related to the Razor compiler (now external) investigate
Projects
None yet
Development

No branches or pull requests

6 participants