Invalid colors in Razor code in HTML attributes

See the attached screenshot: when adding Razor code into HTML attribute, it uses wrong coloring - class names are not shown in the right color, but reserved words are - compare it to the default coloring beneath:
Capture.PNG

4 comments

Hello Martin,

I'm afraid I wasn't able to reproduce this behavior. Could you please attach
a small demo solution along with your color settings (exported through Tools
| Import and Export Settings...)? Thank you!

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

See the attached screenshot: when adding Razor code into HTML
attribute, it uses wrong coloring - class names are not shown in the
right color, but reserved words are - compare it to the default
coloring beneath:
Image:Capture.PNG
---
Original message URL:
http://devnet.jetbrains.net/message/5309210#5309210



0

Here is the color scheme - I use dark color scheme and it's pretty hard to tune it to work acceptably with all those new features and colorings in R#. It might be problem with the color settings, but it looks more likely like different rules used for coloring razor code in html attributes.
There is no need for special sample code, just something like this in Razor code (ListDetailModel is a class with two properties)

<a href="@Url.Action("ListDetail", "Product",  ListDetailModel { groupName = Model.Group.NameID, variationName = Model.Variation.NameID })">



Attachment(s):
Exported-2011-07-13.vssettings.zip
0

Hello Martin,

Thank you! I'm still unable to reproduce this problem. Does this happen with
any attribute even in a newly created MVC3 project?

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Here is the color scheme - I use dark color scheme and it's pretty
hard to tune it to work acceptably with all those new features and
colorings in R#. It might be problem with the color settings, but it
looks more likely like different rules used for coloring razor code in
html attributes.

There is no need for special sample code, just something like this in
Razor code (ListDetailModel is a class with two properties)

<a href="@Url.Action("ListDetail", "Product",  ListDetailModel {
groupName = Model.Group.NameID, variationName = Model.Variation.NameID
})">

---
Original message URL:
http://devnet.jetbrains.net/message/5310229#5310229



0

sample solution with the bug - just open Views/Shared/_Layout.cshtml - can you see different coloring on lines 28 and 29?



Attachment(s):
MvcApplication1.7z.zip
0

Please sign in to leave a comment.