Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-287839: Razor inspection issues with html list containing a foreach

$
0
0
Reporter Andrea Sciamanna (sciamannikoo) Andrea Sciamanna (sciamannikoo)
Created Jan 18, 2012 2:53:39 PM
Updated Jan 20, 2012 8:40:01 PM
Priority Critical
Type Bug
Fix versions Next Major
State Open
Assignee Dmitry Osinovsky (Dmitry.Osinovsky)
Subsystem Code Analysis
Affected versions No Affected versions
Fixed in build No Fixed in build
I've noticed that when having an html list (e.g. an unordered list), if using a foreach statement inside to build the list items, I always get a warning saying that "<ul> contains elements other than <li> or <li> is unenclosed".
A typical sample code:
<ul id="sample-container">
    @foreach (var link in links)
    {
        <li class="sample-item">
            @link
        </li>
    }
</ul>


Provided option is to surround the code with "<li>", but there is no need for that.

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>