<commit_before><nav class="event-date">
  <h2 class="<%= event_h1_class @month %>"><%= "#{@year}#{t_date('year')}#{@month}#{t_date('month')}" %></h2>
  <% unless @cur_node.event_display.to_s.end_with?('only') %>
    <span class="list">
      <%= link_to_monthly Date.new(@year, @month, 1), name: I18n.t("event.options.event_display.list"), display: 'list', style: true %>
    </span>
    <span class="table current">
      <%= link_to_monthly Date.new(@year, @month, 1), name: I18n.t("event.options.event_display.table"), display: 'table', style: true %>
    </span>
  <% end %>
  <ul>
    <li class="prev"><%= link_to_monthly Date.new(@year, @month, 1).advance(days: -1), display: params[:display] %></li>
    <li class="next"><%= link_to_monthly Date.new(@year, @month, 1).advance(months: 1), display: params[:display] %></li>
  </ul>
</nav>

<div id="event-table">
  <table class="calendar">
    <thead>
    <tr>
      <% t_wdays.each do |wday| %>
        <th><span class="wday"><%= wday %><span class="unit"><%= t_date('wday') %></span></span></th>
      <% end %>
    </tr>
    </thead>
    <tbody>
      <% @events.each_with_index do |(date, events), i| %>
        <% if (i % 7) == 0 %>
          <tr>
        <% end %>
        <td class="<%= event_td_class(date, @date) %>">
          <div class="date">
            <div class="daily">
              <%= link_to_daily date, name: date.day, path: @cur_node.parent.try(:url).to_s, enable: events.present? %>
            </div>

            <% if date.national_holiday? %>
              <div class="holiday"><%= HolidayJapan.name date %></div>
            <% end %>

            <% if events.blank? && @cur_node.substitute_html.present? %>
              <dd class="no-event"><%= sanitize @cur_node.substitute_html.html_safe %></dd>
            <% end %>

            <% events.each do |event, categories| %>
              <% event = event.becomes_with_route %>
              <div class="page" data-id="<%= categories.pluck(:id).join(" ") %>">
                <% if categories.present? %>
                  <% cate = categories.entries.sort_by{ |c| c.order }.first %>
                  <div class="data <%= cate.basename %>"><%= link_to cate.name, cate.url %></div>
                <% end %>
                <div class="event"><%= link_to (event.event_name.present? ? event.event_name : event.name), event.url %></div>
              </div>
            <% end %>
          </div>
        </td>
        <% if (i % 7) == 6 %>
          </tr>
        <% end %>
      <% end %>
      </tbody>
  </table>
</div>
<commit_msg>[fix]イベントカレンダー表形式tableのcaptionとscope属性を使用  #3444 (#3736)<commit_after><nav class="event-date">
  <h2 class="<%= event_h1_class @month %>"><%= "#{@year}#{t_date('year')}#{@month}#{t_date('month')}" %></h2>
  <% unless @cur_node.event_display.to_s.end_with?('only') %>
    <span class="list">
      <%= link_to_monthly Date.new(@year, @month, 1), name: I18n.t("event.options.event_display.list"), display: 'list', style: true %>
    </span>
    <span class="table current">
      <%= link_to_monthly Date.new(@year, @month, 1), name: I18n.t("event.options.event_display.table"), display: 'table', style: true %>
    </span>
  <% end %>
  <ul>
    <li class="prev"><%= link_to_monthly Date.new(@year, @month, 1).advance(days: -1), display: params[:display] %></li>
    <li class="next"><%= link_to_monthly Date.new(@year, @month, 1).advance(months: 1), display: params[:display] %></li>
  </ul>
</nav>

<div id="event-table">
  <table class="calendar">
    <caption><%= "#{@year}#{t_date('year')}#{@month}#{t_date('month')}" %></caption>
    <thead>
    <tr>
      <% t_wdays.each do |wday| %>
        <th scope="col"><span class="wday"><%= wday %><span class="unit"><%= t_date('wday') %></span></span></th>
      <% end %>
    </tr>
    </thead>
    <tbody>
      <% @events.each_with_index do |(date, events), i| %>
        <% if (i % 7) == 0 %>
          <tr>
        <% end %>
        <td class="<%= event_td_class(date, @date) %>">
          <div class="date">
            <div class="daily">
              <%= link_to_daily date, name: date.day, path: @cur_node.parent.try(:url).to_s, enable: events.present? %>
            </div>

            <% if date.national_holiday? %>
              <div class="holiday"><%= HolidayJapan.name date %></div>
            <% end %>

            <% if events.blank? && @cur_node.substitute_html.present? %>
              <dd class="no-event"><%= sanitize @cur_node.substitute_html.html_safe %></dd>
            <% end %>

            <% events.each do |event, categories| %>
              <% event = event.becomes_with_route %>
              <div class="page" data-id="<%= categories.pluck(:id).join(" ") %>">
                <% if categories.present? %>
                  <% cate = categories.entries.sort_by{ |c| c.order }.first %>
                  <div class="data <%= cate.basename %>"><%= link_to cate.name, cate.url %></div>
                <% end %>
                <div class="event"><%= link_to (event.event_name.present? ? event.event_name : event.name), event.url %></div>
              </div>
            <% end %>
          </div>
        </td>
        <% if (i % 7) == 6 %>
          </tr>
        <% end %>
      <% end %>
      </tbody>
  </table>
</div>

{'fraction_non_alphanumeric': 0.2190458159787959, 'fraction_numerical': 0.007951533510034078, 'mean_word_length': 2.380038387715931, 'pattern_counts': {'":': 0, '<': 174, '<?xml version=': 0, '>': 174, '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': '4226540', 'n_tokens_mistral': 1987, 'n_tokens_neox': 1797, 'n_words': 352}