<div id='standby_highlighting'>
  <%= t('common.highlighting') %>
</div>
<pre id='code' name='code' class='<%= @code_type %>' cols='80' rows='50'>
  <%# This can't be indented, because the indention is preserved and shown in the code %>
<%= file_contents %>
</pre>

<script>
//<![CDATA[
  dp.SyntaxHighlighter.ClipboardSwf = '/javascripts/syntaxhighlighter/clipboard.swf';
  dp.SyntaxHighlighter.HighlightAll('code');

  document.getElementById('standby_highlighting').style.display = 'none';

  var annotation_menu = document.getElementById('annotation_menu');
  if (annotation_menu) {
    annotation_menu.style.display = 'block';
  }

  source_code_ready();

  <% if (defined? annots) %>
    <% annots.each do |annot| %>
      add_annotation_text(<%= annot.annotation_text.id %>,
                          '<%= simple_format(escape_javascript(annot.annotation_text.content.to_s)) %>');
      add_annotation(<%= annot.id %>,
                     { start: <%= annot.line_start %>, end: <%= annot.line_end %> },
                     '<%= annot.annotation_text.id %>');
    <% end %>
  <% end %>

  <% if !@focus_line.nil? %>
    focus_source_code_line(<%= @focus_line %>);
  <% end %>
//]]>
</script>

<div id='standby_highlighting'>
  <%= t('common.highlighting') %>
</div>
<pre id='code' name='code' class='<%= @code_type %>' cols='80' rows='50'>
  <%# This can't be indented, because the indention is preserved and shown in the code %>
<%= file_contents %>
</pre>

<script>
//<![CDATA[
  dp.SyntaxHighlighter.ClipboardSwf = '/javascripts/syntaxhighlighter/clipboard.swf';
  dp.SyntaxHighlighter.HighlightAll('code');

  document.getElementById('standby_highlighting').style.display = 'none';

  var annotation_menu = document.getElementById('annotation_menu');
  if (annotation_menu) {
    annotation_menu.style.display = 'table';
  }

  source_code_ready();

  <% if (defined? annots) %>
    <% annots.each do |annot| %>
      add_annotation_text(<%= annot.annotation_text.id %>,
                          '<%= simple_format(escape_javascript(annot.annotation_text.content.to_s)) %>');
      add_annotation(<%= annot.id %>,
                     { start: <%= annot.line_start %>, end: <%= annot.line_end %> },
                     '<%= annot.annotation_text.id %>');
    <% end %>
  <% end %>

  <% if !@focus_line.nil? %>
    focus_source_code_line(<%= @focus_line %>);
  <% end %>
//]]>
</script>

Tweak to annotation category tag pills
Tweak to annotation category tag pills
