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
source to share
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.
source to share
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.
source to share