diff --git a/docs/The_fOOrth_User_Guide.odt b/docs/The_fOOrth_User_Guide.odt index ffa90d8..5cb50d6 100644 Binary files a/docs/The_fOOrth_User_Guide.odt and b/docs/The_fOOrth_User_Guide.odt differ diff --git a/lib/fOOrth/library/formatting/array.rb b/lib/fOOrth/library/formatting/array.rb index c27ccb4..30ce542 100644 --- a/lib/fOOrth/library/formatting/array.rb +++ b/lib/fOOrth/library/formatting/array.rb @@ -52,8 +52,8 @@ class Array public #Print out the array as bullet points. - def puts_foorth_bullets - puts foorth_format_bullets + def puts_foorth_bullets(page_width) + puts foorth_format_bullets(page_width) end #Convert the array to strings with bullet points. @@ -65,7 +65,7 @@ class Array builder = XfOOrth::BulletPoints.new(page_width) self.each do |pair| - builder.add(*pair) + builder.add(*pair.prepare_bullet_data) end builder.render.join("\n").freeze @@ -78,4 +78,13 @@ class Array format_foorth_pages(false, page_width)[0] || [] end + #Get data ready for being in a bullet point. + def prepare_bullet_data + if length < 2 + ["*", self[0]] + else + self + end + end + end diff --git a/lib/fOOrth/library/formatting/hash.rb b/lib/fOOrth/library/formatting/hash.rb index 991c1b6..7ab8ffd 100644 --- a/lib/fOOrth/library/formatting/hash.rb +++ b/lib/fOOrth/library/formatting/hash.rb @@ -6,8 +6,8 @@ class Hash # Bullets ======================================================== #Print out the array as bullet points. - def puts_foorth_bullets - puts foorth_format_bullets + def puts_foorth_bullets(page_width) + puts foorth_format_bullets(page_width) end #Convert the array to strings with bullet points. diff --git a/lib/fOOrth/library/formatting/object.rb b/lib/fOOrth/library/formatting/object.rb index 6ef20db..c88ff6d 100644 --- a/lib/fOOrth/library/formatting/object.rb +++ b/lib/fOOrth/library/formatting/object.rb @@ -8,6 +8,11 @@ class Object self.to_s.format_description(max_width) end + #Get data ready for being in a bullet point. + def prepare_bullet_data + ["*", self] + end + end diff --git a/lib/fOOrth/version.rb b/lib/fOOrth/version.rb index 007261a..78df577 100644 --- a/lib/fOOrth/version.rb +++ b/lib/fOOrth/version.rb @@ -3,5 +3,5 @@ #* version.rb - The version string for fOOrth. module XfOOrth #The version string for fOOrth. - VERSION = "0.6.8" + VERSION = "0.6.9" end