BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
03753ff1
Commit
03753ff1
authored
8 years ago
by
http://jneen.net/
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove trailing whitespace from email bodies
parent
a3bb2463
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
reply_parser.rb
lib/gitlab/email/reply_parser.rb
+3
-0
reply_parser_spec.rb
spec/lib/gitlab/email/reply_parser_spec.rb
+0
-0
No files found.
lib/gitlab/email/reply_parser.rb
View file @
03753ff1
...
...
@@ -15,6 +15,9 @@ module Gitlab
body
=
EmailReplyTrimmer
.
trim
(
body
)
# [jneen] not using /\s+$/ here because that deletes empty lines
body
=
body
.
gsub
(
/[ \t]$/
,
''
)
# TODO [jneen]: do we want to allow empty-quoting? (replies only containing a blockquote)
# EmailReplyTrimmer allows this as a special case, so we detect it manually here.
return
""
if
body
.
lines
.
all?
{
|
l
|
l
.
strip
.
empty?
||
l
.
start_with?
(
'>'
)
}
...
...
This diff is collapsed.
Click to expand it.
spec/lib/gitlab/email/reply_parser_spec.rb
View file @
03753ff1
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment