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] No coloring for the code in the global scope #12785

Closed
sandy081 opened this issue Sep 27, 2016 · 1 comment
Closed

[Razor] No coloring for the code in the global scope #12785

sandy081 opened this issue Sep 27, 2016 · 1 comment
Assignees

Comments

@sandy081
Copy link
Member

Testing #12100

@{
    var total = 0;
    var totalMessage = "";
    if(IsPost) {

        // Retrieve the numbers that the user entered.
        var num1 = Request["text1"];
        var num2 = Request["text2"];

        // Convert the entered strings into integers numbers and add.
        total = num1.AsInt() + num2.AsInt();
        totalMessage = "Total = " + total;
    }
}
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <style>
            p {
                margin: 6px 0;
            }
        </style>
        <script>
            window.alert('hello');
        </script>
    </head>
    <body>
        <ul>
            @for (int i = 0; i < 10; i++) {
                <li>@i</li>
            }
        </ul>
    </body>
</html>

Before:

image

Now:

image

@aeschli
Copy link
Contributor

aeschli commented Feb 1, 2017

This issue was moved to demyte/language-cshtml#9

@aeschli aeschli closed this as completed Feb 1, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants