%h3= t("layout.projects.files_in_project") .files .l= render :partial => 'git/shared/whereami' = render :partial => 'git/shared/fork' .both - render_way = choose_render_way(@blob) .file .top= render 'top', :render_way => render_way .data - case render_way - when :image %table.table.blob %tr %td.lines %td.blob :plain

- when :text .gutter= render_line_numbers(@text.length) #output.formatted.cm-s-default %pre#code =#{render_blob(@blob)} :preserve #{h(@blob.data).html_safe} .both - when :binary %table.table.blob %tr %td.lines %td.blob :plain
#{ link_to @blob.basename, raw_path(@project, @treeish, @path) }

:javascript $(document).ready(function() { var text = $('#code').text().replace(/&/gi, '&'); CodeMirror.runMode(text, "#{@blob.raw_mime_type.content_type}", document.getElementById("output")); });