Skip to content

Conversation

@MarcelRobitaille
Copy link
Collaborator

I noticed this while trying to implement something else.

When pasting multiple lines, the empty lines should be filtered out before checking if only one line was pasted, shouldn't they?

For example, if the following is pasted: "this is a test\n", this will be split into ["this is a test", ""] and this.singleLinePasted will be false even though later the empty item will be filtered out and the array will contain a single element.

I also replaced the for loop with the filter method, I hope that's ok. I think it's more clear what is going on.

Copy link
Collaborator

@seyfeb seyfeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn’t check and run this, but it look good to me. I also prefer your solution of using a filter method - makes sense!

@codecov
Copy link

codecov bot commented Feb 19, 2022

Codecov Report

Merging #886 (09bebad) into master (d686024) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #886   +/-   ##
=======================================
  Coverage   21.22%   21.22%           
=======================================
  Files          20       20           
  Lines        1555     1555           
=======================================
  Hits          330      330           
  Misses       1225     1225           
Flag Coverage Δ
integration 7.07% <ø> (ø)
unittests 14.14% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@github-actions
Copy link

github-actions bot commented Feb 19, 2022

Unit Test Results

  22 files    22 suites   8m 47s ⏱️
  66 tests   66 ✔️ 0 💤 0
726 runs  726 ✔️ 0 💤 0

Results for commit 09bebad.

♻️ This comment has been updated with latest results.

MarcelRobitaille and others added 3 commits February 20, 2022 20:00
Signed-off-by: Marcel Robitaille <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
@christianlupus christianlupus merged commit 21dc6ca into nextcloud:master Feb 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants