Why does Resharper enter "foo foo" whenever I press "Enter" from a script tag

I am currently using ReSharper build 6.0.2202.688 and am facing a very strange problem. When I hit the Enter key to add a line break from the Script tag, ReSharper automatically adds the line "foo foo".

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="senchatouch.2/sencha-touch-all-debug.js" type="text/javascript"></script>
    <link href="senchatouch.2/resources/css/sencha-touch.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script type="text/javascript">

foo foo 
foo foo 
foo foo 
foo foo 
foo foo 
foo foo 
foo foo 
foo foo 

  });</script>

</body>
</html>

      

I tried looking for this in LiveTemplates but can't see what is applicable.

I haven't seen any ReSharper settings that could cause this issue. Also, it just accidentally started happening while I was going through some Sencha Touch tutorials.

Any idea what might be causing this? Thanks to

+3


source to share


3 answers


Install the latest version of ReSharper 6.1.1 This bug has been fixed since the release of version 6.0 you are currently using.



+2


source


I also had this problem and updated to ReSharper 6.1.1. However, this did not fix it. In fact, according to the YouTrack page for this bug, it was not fixed until version 7.0.43.13



http://youtrack.jetbrains.com/issue/RSRP-291030

+1


source


This was happening to me in 7.0.1 (7.0.1098.2760)

I found the error was in an invalid script block where the server-side script block was embedded inside the client-side. eg.

<script type="text/javascript" language="javascript">
    <script runat="server" language="C#">
        string ServerString = "this breaks things";
    </script>
    var clientString="<%=ServerString() %>";
</script>

<script type="text/javascript" language="javascript">
// try typing something here and hitting enter for "foo"
</script>

      

The fix for me was to move the nested server-side script block outside of the client-side script.

Note: removing guilt is not my code! I was getting a random foo inserted into my code and wanted it to stop!

I opened a new support ticket with JetBrains as it seems strange to want to insert "foo" and remove other characters from the source code even though I have the wrong html / script.

0


source







All Articles