anchor.diff:                       value_hash.each do |value_id, formatted_value| %>
                       <%= formatted_value %>
                       <% if @results[:include_references]
  -                      source_number = continuous_trait_values[:sources][value_id] %>
  +                         source_reference_id = continuous_trait_values[:sources][value_id]
  +                         source_ids << source_reference_id unless source_reference_id.in? source_ids
  +                         source_number = source_ids.index(source_reference_id) + 1
  +                    %>
                         [<%= link_to("#{source_number}", "#source_#{source_number}") %>]
                       <% end %>
                     <% end %>
  
positive.code:       <div class="row-fluid">
          <table class="table table-condensed table-bordered table-striped table-hover ">
            <tr></tr><th>#</th><th>Source</th></tr>
            <% @results[:sources].each do |source| %>
            <tr id="<%= "source_#{source[:id]}" %>">
              <td><%= source[:id] %></td>
              <td><%= source[:name] %></td>
            </tr>
            <% end %>
          </table>
  
negative.code:                      value_hash.each do |value_id, formatted_value| %>
                        <%= formatted_value %>
                        <% if @results[:include_references]
                          source_reference_id = categorical_trait_values[:sources][value_id]
                          source_ids << source_reference_id unless source_reference_id.in? source_ids
                          source_number = source_ids.index(source_reference_id) + 1
                        %>
                          [<%= link_to("#{source_number}", "#source_#{source_number}") %>]
                        <% end %>
                        <% end %>
  