Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ttscoff committed Nov 23, 2023
1 parent 39bdede commit 467015e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/mdless/console.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 467015e

Please sign in to comment.