1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-24 09:21:12 +00:00
redmine/app/views/common/_file.html.erb
Go MAEDA 6a46743cd3 Fix code copying in common browsers (#36580).
Patch by Vitaly vit9696.


git-svn-id: http://svn.redmine.org/redmine/trunk@21415 e93f8b46-1217-0410-a6f0-8f06a7374b81
2022-02-19 07:36:40 +00:00

21 lines
543 B
Plaintext

<div class="autoscroll">
<table class="filecontent syntaxhl">
<tbody>
<% line_num = 1 %>
<% syntax_highlight_lines(filename, Redmine::CodesetUtil.to_utf8_by_setting(content)).each do |line| %>
<tr id="L<%= line_num %>">
<th class="line-num"><a href="#L<%= line_num %>" data-txt="<%= line_num %>"></a></th>
<td class="line-code">
<% if line == "\n" or line == "\r\n" %>
<br>
<% else %>
<div><%= line.html_safe %></div>
<% end %>
</td>
</tr>
<% line_num += 1 %>
<% end %>
</tbody>
</table>
</div>