Mangled quotes: Again
an old post was this:
"
Here's a contrived example:
throw new ArgumentNullException("", "");
Modify the code to append a string to the first parameter by typing a
plus sign and a quotation mark:
throw new ArgumentNullException("" + ", "");
Close the string by typing a second quotation mark:
throw new ArgumentNullException("" + """, "");
The problem is that ReSharper inserts a single quotation mark in the
first case and two quotation marks in the second case.
I reported this in JIRA and the the ticket was closed with the comment
that this is expected and normal behavior. Did I actually read the
comment correctly and that this is correct behavior?
"
I found that:
When i have:
SomeMethod("abc" + );
and press ", then r# add two "" and place cursor into quotes, like this:
SomeMethod("abc" + "");
this is OK and excepted, but when method have another parameter(string
type) after our first param string, like this:
SomeMethod("abc" + , "xxx");
and press ", then r# add only one " and place cursor after this quote,
like this:
SomeMethod("abc" + ", "xxx");
And this is bad, it does not add pair quote.
I Think is is bug, because if second param is not string "xxx", but for
example int 111, then it addes double quotes and place cursor right
place:
SomeMethod("abc" + "", 111);
--
Peter Sulek
terrorix@centrum.sk
XanaNews ver. 1.18.1.6
Please sign in to leave a comment.
+1 on this mate (show of solidarity here).
The Resharper auto-quoting logic annoys the heck out of me so its one of the first things I turn off - ends up causing more keystrokes than it ever helps me.
+1 as well. Over the years, this has ticked me off more times than I can count.
It is almost as if R# is saying "Hey, there's a quote character further to the right on this line, so I don't need to close this just-opened string". What R# fails to do is check whether or not that quote character to the right marks the beginning of another string that is already closed.
Peter Sulek wrote:
Created jira bug report -http://www.jetbrains.net/jira/browse/RSRP-47391
--
Peter Sulek
terrorix@centrum.sk
XanaNews ver. 1.18.1.6
+1 from me as well. This is an annoying bug.
"Peter Sulek" <terrorix@centrum.sk> wrote in message
news:f9s6tr$p3t$1@is.intellij.net...
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>