From 467015edf93d8b1895129988dc169176465d9e83 Mon Sep 17 00:00:00 2001 From: Brett Terpstra Date: Thu, 23 Nov 2023 09:04:18 -0600 Subject: [PATCH] code cleanup --- lib/mdless/console.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/mdless/console.rb b/lib/mdless/console.rb index da61e63..670a936 100644 --- a/lib/mdless/console.rb +++ b/lib/mdless/console.rb @@ -538,13 +538,13 @@ def preprocess(input) longest = longest < @cols ? longest + 1 : @cols lines.map do |line| if line =~ /^[-.]{3}\s*$/ - line = "#{color('metadata marker')}#{'%' * longest }" + line = "#{color('metadata marker')}#{'%' * longest}" else line.sub!(/^(.*?:)[ \t]+(\S)/, '\1 \2') line = "#{color('metadata color')}#{line}" end - line += ("\u00A0" * (longest - line.uncolor.strip.length) ) + xc + line += "\u00A0" * (longest - line.uncolor.strip.length) + xc line end.join("\n") + "#{xc}\n" end @@ -559,7 +559,7 @@ def preprocess(input) lines.map do |line| line.sub!(/^(.*?:)[ \t]+(\S)/, '\1 \2') line = "#{color('metadata color')}#{line}" - line += "\u00A0" * (longest - line.uncolor.strip.length ) + line += "\u00A0" * (longest - line.uncolor.strip.length) line + xc end.join("\n") + "#{"\u00A0" * longest}#{xc}\n" end