<% offset = ( params[:page] || '1' ).to_i - 1 %>
<% offset *= WillPaginate.per_page %>

<% packages.each_with_index do |package, index| %>

  <% offset_index = offset + index %>

  <% unless offset_index.zero? %>

    <div class="list-group-separator"></div>

  <% end %>

  <div class='list-group-item col-sm-10'>

    <div class='row-picture'>

      <i class='circle' alt='icon'>

        <%= offset_index + 1 %>
      </i>

    </div>

    <div class='row-content'>

      <h4 class='list-group-item-heading'>
        <%= link_to package.name, package_path(package.name) %>
      </h4>

      <p class='list-group-item-text'>
        <%= truncate package.description, length: 50 %>
      </p>

    </div>

  </div>

  <div class='col-sm-2 hidden-xs cs-pull-right cs-package-stars'>

    <h4 class='cs-star-rating'>
      <i class='material-icons'>star_rate</i>
      <span><%= package.stargazers_count %></span>
    </h4>

  </div>

<% end %>

<% offset = ( params[:page] || '1' ).to_i - 1 %>
<% offset *= WillPaginate.per_page %>

<% packages.each_with_index do |package, index| %>

  <% offset_index = offset + index %>

  <% unless offset_index.zero? %>

    <div class="list-group-separator"></div>

  <% end %>

  <div class='list-group-item col-sm-10'>

    <div class='row-picture'>

      <i class='circle' alt='icon'>

        <%= offset_index + 1 %>
      </i>

    </div>

    <div class='row-content'>

      <h4 class='list-group-item-heading'>
        <%= link_to package.name, package_path(package.name) %>
      </h4>

      <p class='list-group-item-text'>
        <% if package.description.present? %>
          <% cleaned_description = package.description.gsub('`', '"') %>
          <%= truncate cleaned_description, length: 50 %>
        <% end %>
      </p>

    </div>

  </div>

  <div class='col-sm-2 hidden-xs cs-pull-right cs-package-stars'>

    <h4 class='cs-star-rating'>
      <i class='material-icons'>star_rate</i>
      <span><%= package.stargazers_count %></span>
    </h4>

  </div>

<% end %>

Fix unescaped back-tick in package description bug
Fix unescaped back-tick in package description bug