Skip to content

Commit 496ec8e

Browse files
Merge pull request #246 from ekohl/handle-missing-description
Handle a missing description gracefully
2 parents a76dd4c + 6a50149 commit 496ec8e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/puppet-strings/markdown/base.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ def private?
170170
end
171171

172172
def word_wrap(text, line_width: 120, break_sequence: "\n")
173+
return unless text
173174
text.split("\n").collect! do |line|
174175
line.length > line_width ? line.gsub(/(.{1,#{line_width}})(\s+|$)/, "\\1#{break_sequence}").strip : line
175176
end * break_sequence

0 commit comments

Comments
 (0)