We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a76dd4c + 6a50149 commit 496ec8eCopy full SHA for 496ec8e
lib/puppet-strings/markdown/base.rb
@@ -170,6 +170,7 @@ def private?
170
end
171
172
def word_wrap(text, line_width: 120, break_sequence: "\n")
173
+ return unless text
174
text.split("\n").collect! do |line|
175
line.length > line_width ? line.gsub(/(.{1,#{line_width}})(\s+|$)/, "\\1#{break_sequence}").strip : line
176
end * break_sequence
0 commit comments