preserve indentation with   in code HTML output

This commit is contained in:
Josh Holtrop 2017-01-15 14:21:02 -05:00
parent 1fe35ea23d
commit 0b463881cb

View File

@ -52,7 +52,7 @@
<% end %> <% end %>
</td> </td>
<td><%= line_number %></td> <td><%= line_number %></td>
<td class="code"><%= CGI.escape_html(line.chomp).gsub("\t", "&nbsp;" * 4) %></td> <td class="code"><%= CGI.escape_html(line.chomp).gsub("\t", " " * 4).gsub(" ", "&nbsp;") %></td>
</tr> </tr>
<% end %> <% end %>
</table> </table>