Commit 62fd4897 authored by Marcel Amirault's avatar Marcel Amirault Committed by James Fargher

Updating usage dictionary generator

Update avoids lines that end in whitespace
parent 48e6b011
---
title: Updating usage dictionary generator
merge_request: 55956
author:
type: other
...@@ -46,7 +46,7 @@ module Gitlab ...@@ -46,7 +46,7 @@ module Gitlab
end end
def render_tiers(object) def render_tiers(object)
"Tiers: #{format(:tier, object[:tier])}" "Tiers:#{format(:tier, object[:tier])}"
end end
def format(key, value) def format(key, value)
......
...@@ -17,7 +17,7 @@ module Gitlab ...@@ -17,7 +17,7 @@ module Gitlab
when :introduced_by_url when :introduced_by_url
"[Introduced by](#{value})" "[Introduced by](#{value})"
when :distribution, :tier when :distribution, :tier
Array(value).map { |tier| "`#{tier}`" }.join(', ') Array(value).map { |tier| " `#{tier}`" }.join(',')
else else
value value
end end
......
...@@ -10,8 +10,8 @@ RSpec.describe Gitlab::Usage::Docs::ValueFormatter do ...@@ -10,8 +10,8 @@ RSpec.describe Gitlab::Usage::Docs::ValueFormatter do
:data_source | 'redis' | 'Redis' :data_source | 'redis' | 'Redis'
:data_source | 'ruby' | 'Ruby' :data_source | 'ruby' | 'Ruby'
:introduced_by_url | 'http://test.com' | '[Introduced by](http://test.com)' :introduced_by_url | 'http://test.com' | '[Introduced by](http://test.com)'
:tier | %w(gold premium) | '`gold`, `premium`' :tier | %w(gold premium) | ' `gold`, `premium`'
:distribution | %w(ce ee) | '`ce`, `ee`' :distribution | %w(ce ee) | ' `ce`, `ee`'
:key_path | 'key.path' | '**`key.path`**' :key_path | 'key.path' | '**`key.path`**'
:milestone | '13.4' | '13.4' :milestone | '13.4' | '13.4'
:status | 'data_available' | '`data_available`' :status | 'data_available' | '`data_available`'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment