<commit_before>﻿@{
    // odd formatting in this file is to cause more attractive results in the output.
    var items = (IEnumerable<dynamic>)Enumerable.Cast<dynamic>(Model);
}
@{
if (!HasText(Model.Text)) {
    @DisplayChildren(Model)
} else {
    string requestUrl = Request.Path.Replace(Request.ApplicationPath, string.Empty).TrimEnd('/').ToUpperInvariant();
    string modelUrl = Model.Href.Replace(Request.ApplicationPath, string.Empty).TrimEnd('/').ToUpperInvariant();
    if ((!string.IsNullOrEmpty(modelUrl) && requestUrl.StartsWith(modelUrl)) || requestUrl == modelUrl) { 
	    Model.Classes.Add("current");
    }
    if(items.Any()) {
        Model.Classes.Add("dropdown");
    }
    var tag = Tag(Model, "li");
    @tag.StartElement
            
    @* morphing the shape to keep Model untouched*@
    Model.Metadata.Alternates.Clear(); 
    Model.Metadata.Type = "MenuItemLink";
    @Display(Model)
    
    if (items.Any()) {
        <ul>
        @DisplayChildren(Model)<commit_msg>#18740: Preventing link collision on "current" class<commit_after>﻿@{
    // odd formatting in this file is to cause more attractive results in the output.
    var items = (IEnumerable<dynamic>)Enumerable.Cast<dynamic>(Model);
}
@{
if (!HasText(Model.Text)) {
    @DisplayChildren(Model)
} else {
    string requestUrl = Request.Path.Replace(Request.ApplicationPath, string.Empty).TrimEnd('/').ToUpperInvariant();
    string modelUrl = Model.Href.Replace(Request.ApplicationPath, string.Empty).TrimEnd('/').ToUpperInvariant();
    if (requestUrl == modelUrl) { 
	    Model.Classes.Add("current");
    }
    if(items.Any()) {
        Model.Classes.Add("dropdown");
    }
    var tag = Tag(Model, "li");
    @tag.StartElement
            
    @* morphing the shape to keep Model untouched*@
    Model.Metadata.Alternates.Clear(); 
    Model.Metadata.Type = "MenuItemLink";
    @Display(Model)
    
    if (items.Any()) {
        <ul>
        @DisplayChildren(Model)
{'fraction_non_alphanumeric': 0.14854517611026033, 'fraction_numerical': 0.002552322613578356, 'mean_word_length': 3.384787472035794, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6031196', 'n_tokens_mistral': 596, 'n_tokens_neox': 574, 'n_words': 119}