1
0
mirror of https://github.com/github/choosealicense.com synced 2025-01-03 10:31:44 +01:00
This commit is contained in:
Mike Linksvayer 2017-11-20 11:57:08 -08:00
parent 261fbd26d8
commit 1eb373964e

View File

@ -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