Loading gitlabFilter/grid_table_filter.rb +3 −2 Original line number Original line Diff line number Diff line Loading @@ -284,7 +284,8 @@ module Banzai unless has_header unless has_header # Set default alignments from the first separator which takes the role of header # Set default alignments from the first separator which takes the role of header header_separator_index = 0 header_separator_index = 0 parts = lines[0].strip.delete_prefix("+").split("+") line = lines.find { |l| !l.strip.empty? } # first non-blank line parts = line.strip.delete_prefix("+").split("+") parts.each_with_index do |part, part_index| parts.each_with_index do |part, part_index| default_alignments << if part.start_with?(":") && !part.end_with?(":") default_alignments << if part.start_with?(":") && !part.end_with?(":") Loading @@ -296,7 +297,7 @@ module Banzai end end start_pos = part_index == 0 ? 0 : header_delimiter_positions[part_index - 1] start_pos = part_index == 0 ? 0 : header_delimiter_positions[part_index - 1] pos = lines[0][start_pos + 1..]&.index("+") pos = line[start_pos + 1..]&.index("+") header_delimiter_positions << (pos ? pos + start_pos + 1 : -1) header_delimiter_positions << (pos ? pos + start_pos + 1 : -1) end end end end Loading Loading
gitlabFilter/grid_table_filter.rb +3 −2 Original line number Original line Diff line number Diff line Loading @@ -284,7 +284,8 @@ module Banzai unless has_header unless has_header # Set default alignments from the first separator which takes the role of header # Set default alignments from the first separator which takes the role of header header_separator_index = 0 header_separator_index = 0 parts = lines[0].strip.delete_prefix("+").split("+") line = lines.find { |l| !l.strip.empty? } # first non-blank line parts = line.strip.delete_prefix("+").split("+") parts.each_with_index do |part, part_index| parts.each_with_index do |part, part_index| default_alignments << if part.start_with?(":") && !part.end_with?(":") default_alignments << if part.start_with?(":") && !part.end_with?(":") Loading @@ -296,7 +297,7 @@ module Banzai end end start_pos = part_index == 0 ? 0 : header_delimiter_positions[part_index - 1] start_pos = part_index == 0 ? 0 : header_delimiter_positions[part_index - 1] pos = lines[0][start_pos + 1..]&.index("+") pos = line[start_pos + 1..]&.index("+") header_delimiter_positions << (pos ? pos + start_pos + 1 : -1) header_delimiter_positions << (pos ? pos + start_pos + 1 : -1) end end end end Loading