- if current_user
  %button.btn.btn-default.star-btn.toggle-star{ type: "button", data: { endpoint: toggle_star_project_path(@project, :json) } }
    - if current_user.starred?(@project)
      = sprite_icon('star')
      %span.starred= _('Unstar')
    - else
      = sprite_icon('star-o')
      %span= s_('StarProject|Star')
  .count-with-arrow
    %span.arrow
    %span.count.star-count
      = @project.star_count

- else
  = link_to new_user_session_path, class: 'btn has-tooltip star-btn', title: _('You must sign in to star a project') do
    = sprite_icon('star')
    #{ s_('StarProject|Star') }
  .count-with-arrow
    %span.arrow
    %span.count
      = @project.star_count

- if current_user
  %button.btn.btn-default.star-btn.toggle-star{ type: "button", data: { endpoint: toggle_star_project_path(@project, :json) } }>
    - if current_user.starred?(@project)
      = sprite_icon('star')
      %span.starred= _('Unstar')
    - else
      = sprite_icon('star-o')
      %span= s_('StarProject|Star')
  .count-with-arrow
    %span.arrow
    %span.count.star-count
      = @project.star_count

- else
  = link_to new_user_session_path, class: 'btn has-tooltip star-btn', title: _('You must sign in to star a project') do
    = sprite_icon('star')
    #{ s_('StarProject|Star') }
  .count-with-arrow
    %span.arrow
    %span.count
      = @project.star_count

Remove extra whitespace in star project button
Remove extra whitespace in star project button
