From 8e29500fcf0fa7063dd54fcdfce3818d6160d14c Mon Sep 17 00:00:00 2001 From: Roberto Alsina Date: Sat, 10 Aug 2024 16:54:46 -0300 Subject: [PATCH] Make line-numbers not-selectable. This makes the listing copy-friendly *AND* doesn't require wrapping things in tables --- src/formatters/html.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/formatters/html.cr b/src/formatters/html.cr index 8c4abf5..3cc18bc 100644 --- a/src/formatters/html.cr +++ b/src/formatters/html.cr @@ -47,7 +47,7 @@ module Tartrazine line_label = line_numbers? ? "#{i + 1}".rjust(4).ljust(5) : "" line_class = highlighted?(i + 1) ? "class=\"#{get_css_class("LineHighlight", theme)}\"" : "" line_id = linkable_line_numbers? ? "id=\"#{line_number_id_prefix}#{i + 1}\"" : "" - outp << "#{line_label}" + outp << "#{line_label} " line.each do |token| fragment = "#{token[:value]}" outp << fragment