summaryrefslogtreecommitdiffstats
path: root/lib/puppet/interface
diff options
context:
space:
mode:
authorMatt Robinson <matt@puppetlabs.com>2011-05-26 16:12:09 -0700
committerMatt Robinson <matt@puppetlabs.com>2011-05-26 16:12:09 -0700
commit3c0483fad82d3c5650b8c283f134c043e9074649 (patch)
treec1524af6adca257cf7bd9ea7d7fd6a44268210f6 /lib/puppet/interface
parent76887064b7691eb6f6751739df5bc83beee76a80 (diff)
parentea7908b8d6dc2092b7a7ff4b92452821a3afd86b (diff)
downloadpuppet-3c0483fad82d3c5650b8c283f134c043e9074649.tar.gz
puppet-3c0483fad82d3c5650b8c283f134c043e9074649.tar.xz
puppet-3c0483fad82d3c5650b8c283f134c043e9074649.zip
Merge branch 'ticket/2.7rc/maint-faces_docs_spec_fixes' into ticket/2.7rc/maint-doc_changes_without_failures
* ticket/2.7rc/maint-faces_docs_spec_fixes: maint: Fix order dependent spec failure for face indirection (#7690) Don't blow up when listing terminuses available for faces maint: Dedup the loadpath so we don't have to walk it multiple times Maint: Fix ellipses for short descriptions Resolved Conflicts: lib/puppet/interface/documentation.rb
Diffstat (limited to 'lib/puppet/interface')
-rw-r--r--lib/puppet/interface/documentation.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/puppet/interface/documentation.rb b/lib/puppet/interface/documentation.rb
index aedcc1c24..fcaec2568 100644
--- a/lib/puppet/interface/documentation.rb
+++ b/lib/puppet/interface/documentation.rb
@@ -77,8 +77,10 @@ class Puppet::Interface
if @short_description.nil? then
return nil if @description.nil?
lines = @description.split("\n")
- grab = [5, lines.index('') || 5].min
- @short_description = lines[0, grab].join("\n") + ' [...]'
+ first_paragraph_break = lines.index('') || 5
+ grab = [5, first_paragraph_break].min
+ @short_description = lines[0, grab].join("\n")
+ @short_description += ' [...]' if (grab < lines.length and first_paragraph_break >= 5)
end
@short_description
end