Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
44b5c7a0
Commit
44b5c7a0
authored
Feb 17, 2021
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'mo-fix-warning-csv' into 'master'
Fix warning deprecation See merge request gitlab-org/gitlab!54370
parents
5ccc418c
3907d85f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
lib/csv_builder.rb
lib/csv_builder.rb
+3
-2
No files found.
lib/csv_builder.rb
View file @
44b5c7a0
...
...
@@ -16,6 +16,7 @@
class
CsvBuilder
DEFAULT_ORDER_BY
=
'id'
.
freeze
DEFAULT_BATCH_SIZE
=
1000
PREFIX_REGEX
=
/^[=\+\-@;]/
.
freeze
attr_reader
:rows_written
...
...
@@ -114,8 +115,8 @@ class CsvBuilder
def
excel_sanitize
(
line
)
return
if
line
.
nil?
return
line
unless
line
.
is_a?
(
String
)
&&
line
.
match?
(
PREFIX_REGEX
)
line
=
[
"'"
,
line
].
join
if
line
=~
/^[=\+\-@;]/
line
[
"'"
,
line
].
join
end
end
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