mirror of
https://github.com/github/choosealicense.com
synced 2025-01-03 10:31:44 +01:00
rubocop
This commit is contained in:
parent
261fbd26d8
commit
1eb373964e
@ -46,7 +46,7 @@ site.collections['licenses'].docs.each do |license|
|
|||||||
if line.length > 78
|
if line.length > 78
|
||||||
indented_line = line.match(/\A(\s*)(.*)/)
|
indented_line = line.match(/\A(\s*)(.*)/)
|
||||||
line_indent = indented_line[1]
|
line_indent = indented_line[1]
|
||||||
line_text = indented_line[2] .gsub(/\s+/,' ')
|
line_text = indented_line[2] .gsub(/\s+/, ' ')
|
||||||
text_width = 78 - line_indent.length
|
text_width = 78 - line_indent.length
|
||||||
line = line_text.gsub(/(.{1,#{text_width}})(\s+|\Z)/, "#{line_indent}\\1\n")
|
line = line_text.gsub(/(.{1,#{text_width}})(\s+|\Z)/, "#{line_indent}\\1\n")
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user