Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle alternate line endings #3250

Merged
merged 1 commit into from
Oct 10, 2022
Merged

Handle alternate line endings #3250

merged 1 commit into from
Oct 10, 2022

Conversation

garrettjstevens
Copy link
Collaborator

This does a global find-and-replace of .split('\n') with .split(/\n|\r\n|\r/). This should handle unix (\n), dos (\r\n) and old-style mac (\r) line-endings. Hopefully it helps avoid issues especially with users creating files on Windows, like this.

@garrettjstevens garrettjstevens self-assigned this Oct 4, 2022
@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Oct 4, 2022
@codecov
Copy link

codecov bot commented Oct 4, 2022

Codecov Report

Merging #3250 (2545628) into main (f7bd5b0) will increase coverage by 0.00%.
The diff coverage is 76.92%.

@@           Coverage Diff           @@
##             main    #3250   +/-   ##
=======================================
  Coverage   59.38%   59.39%           
=======================================
  Files         674      674           
  Lines       28782    28783    +1     
  Branches     7008     7008           
=======================================
+ Hits        17092    17095    +3     
+ Misses      11415    11413    -2     
  Partials      275      275           
Impacted Files Coverage Δ
packages/core/data_adapters/CytobandAdapter.ts 41.66% <ø> (ø)
...parative-adapters/src/ChainAdapter/ChainAdapter.ts 0.00% <0.00%> (ø)
...parative-adapters/src/DeltaAdapter/DeltaAdapter.ts 0.00% <0.00%> (ø)
...s/src/MCScanAnchorsAdapter/MCScanAnchorsAdapter.ts 82.22% <ø> (ø)
...SimpleAnchorsAdapter/MCScanSimpleAnchorsAdapter.ts 0.00% <ø> (ø)
...tive-adapters/src/MashMapAdapter/MashMapAdapter.ts 0.00% <ø> (ø)
.../comparative-adapters/src/PAFAdapter/PAFAdapter.ts 65.11% <ø> (ø)
plugins/comparative-adapters/src/util.ts 100.00% <ø> (ø)
...fig/src/RefNameAliasAdapter/RefNameAliasAdapter.ts 92.30% <ø> (ø)
.../GridBookmarkWidget/components/ImportBookmarks.tsx 32.43% <ø> (ø)
... and 13 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@cmdcolin
Copy link
Collaborator

should be ok. it is a bit slower to do this regex but on the order of <500ms for even large files

@cmdcolin cmdcolin removed the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Oct 10, 2022
@cmdcolin
Copy link
Collaborator

it is some question of whether these line endings will realistically be encountered in some of the data files, but, may not hurt either

@cmdcolin cmdcolin added the enhancement New feature or request label Oct 10, 2022
@cmdcolin cmdcolin merged commit 27bd2a2 into main Oct 10, 2022
@cmdcolin cmdcolin deleted the handle_other_line_endings branch October 10, 2022 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants