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

Ternary operators #12

Open
djechelon opened this issue Feb 6, 2015 · 0 comments
Open

Ternary operators #12

djechelon opened this issue Feb 6, 2015 · 0 comments

Comments

@djechelon
Copy link

Hi,

I found that the converter systhematically missed ternary operator in ASPX.

Here is a source fragment

<th align="center" style="width: 12%" class="<%=tableWrapper.Column == "value" ? "selected" : "" %>">

Here is how it gets converted

<th align="center" style="width: 12%" class="@tableWrapper.Column == "value" ? "selected" : """>

Here is how it's supposed to work

<th align="center" style="width: 12%" class="@(tableWrapper.Column == "value" ? "selected" : "")">

Notice the parentheses wrapping the @ expression containing the ternary.

I fixed them all manually. I hope in a future release this will be handled correctly by the tool. Nice work, anyway!

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