summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtasks/docs.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/tasks/docs.rb b/tasks/docs.rb
index 5fddc10c79..79c77025d1 100755
--- a/tasks/docs.rb
+++ b/tasks/docs.rb
@@ -33,10 +33,12 @@ namespace :docs_site do
text = ""
text << "#{resource_name} 'name' do\n"
properties.each do |p|
+ pretty_default = pretty_default(p["default"])
+
text << " #{p["name"].ljust(padding_size)}"
text << friendly_types_list(p["is"])
text << " # default value: 'name' unless specified" if p["name_property"]
- text << " # default value: #{pretty_default(p["default"])}" unless pretty_default(p["default"]).nil?
+ text << " # default value: #{pretty_default}" unless pretty_default.nil? || (pretty_default.is_a?(String) && pretty_default.length > 40) # 40 chars is too long for these example blocks
text << "\n"
end
text << " #{"action".ljust(padding_size)}Symbol # defaults to :#{default_action.first} if not specified\n"