Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dictionary as Razor model #49

Open
kbkrunner opened this issue Dec 18, 2018 · 0 comments
Open

Dictionary as Razor model #49

kbkrunner opened this issue Dec 18, 2018 · 0 comments

Comments

@kbkrunner
Copy link

kbkrunner commented Dec 18, 2018

When the model definition is a Dictionary or other key-value list, the definition for is being split halfway through, it looks to happen on the comma ',' character. Then the rest of the minified contents are on the same line as the second half of the definition, causing a parser error.

Line 1: @model Dictionary<string,
Line 2: MyAssemblyName.Setting[]> @{ ViewData["Title"] = "Settings"; ......

Edit: Found this happens when there is a space after the comma, when there's no space the program works fine. But VS adds a space after the comma when the page is formatted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant