madskristensen / WebEssentials2015

A Visual Studio extension for web developers
Other
301 stars 94 forks source link

JavaScript Region Not Working VS2015 #220

Open bplus0 opened 7 years ago

bplus0 commented 7 years ago

When I surround my JavaScript code in small portions the regions work perfectly, but when I try to create larger regions, the expand and compress '+' '-' buttons are not on the left side. I am using Visual Studio 2015, and installed all the latest updates.

I will happily provide more info if needed.

dstepanov25 commented 7 years ago

I also faced with this issue. I'm using Razor constancts in my Views For instance this code can broke Region functionality

@{
    const string UserName = "Alex";
}
@section scripts {
    <script type="text/javascript">
        // #region Alerts
        function showAlert() {
           alert('@UserName');
        }
        // #endregion Alerts
    </script>
}
ZTHawk commented 5 years ago

I have this issue too.

<script>
    function test() {
        var name = "";
    }
</script>

"Script" region and function "test" can be collapsed. But here:

<script>
    function test() {
        var name = @csVariable;
    }
</script>

Only the "script" region can be collapsed. Function "test" cannot be collapsed. (there is no '-' button)