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 08b88a0 + 9b53883 commit 9e1bb75Copy full SHA for 9e1bb75
lib/puppet-strings/markdown/base.rb
@@ -172,6 +172,8 @@ def private?
172
end
173
174
def word_wrap(text, line_width: 120, break_sequence: "\n")
175
+ return unless text
176
+
177
text.split("\n").collect! do |line|
178
line.length > line_width ? line.gsub(/(.{1,#{line_width}})(\s+|$)/, "\\1#{break_sequence}").strip : line
179
end * break_sequence
0 commit comments