Skip to content

Commit 15cfa92

Browse files
committed
Document the cloud mess
1 parent a328675 commit 15cfa92

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

modules/post/multi/general/wall.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ def cowsay(text)
3737
# cowsay(1) chunks a message up into 39-byte chunks and wraps it in '| ' and ' |'
3838
# Rex::Text.wordwrap(text, 0, 39, ' |', '| ') almost does this, but won't
3939
# split a word that has > 39 characters in it which results in oddly formed
40-
# text in the cowsay banner, so just do it by hand
40+
# text in the cowsay banner, so just do it by hand. This big mess wraps
41+
# the provided text in an ASCII-cloud and then makes it look like the cloud
42+
# is a thought/word coming from the ASCII-cow. Each line in the
43+
# ASCII-cloud is no more than 34-characters long, and the cloud corners are
44+
# made to look rounded
4145
text_lines = text.scan(/.{1,34}/)
4246
max_length = text_lines.map(&:size).sort.last
4347
cloud_parts = []

0 commit comments

Comments
 (0)