Defect #30491 ยป short_description_fix.diff
| app/models/project.rb (working copy) | ||
|---|---|---|
|
name
|
||
|
end
|
||
|
# Returns a short description of the projects (first lines)
|
||
|
# Returns a short description of the projects (first 3 lines)
|
||
|
def short_description(length = 255)
|
||
|
description.gsub(/^(.{#{length}}[^\n\r]*).*$/m, '\1...').strip if description
|
||
|
if description
|
||
|
description =~ /\A(?>[^\r\n]*(?:\r\n?|\n)?){0,3}/
|
||
|
s = $&.strip[0...length]
|
||
|
s << '...' if s != description
|
||
|
end
|
||
|
end
|
||
|
def css_classes
|
||