Skip to content

Remove whitespace around code when showing in interactive window #10057

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

Merged
merged 1 commit into from
Feb 11, 2020

Conversation

rchiodo
Copy link

@rchiodo rchiodo commented Feb 11, 2020

For #9116

Do this entirely in the UI as the code submitted has to match the code in the file for cell hashes to match up.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov-io
Copy link

codecov-io commented Feb 11, 2020

Codecov Report

Merging #10057 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10057      +/-   ##
==========================================
+ Coverage   61.23%   61.26%   +0.02%     
==========================================
  Files         565      565              
  Lines       30195    30214      +19     
  Branches     4568     4571       +3     
==========================================
+ Hits        18491    18511      +20     
+ Misses      10671    10670       -1     
  Partials     1033     1033
Impacted Files Coverage Δ
src/datascience-ui/common/index.ts 94.21% <100%> (+1.07%) ⬆️
src/client/common/process/proc.ts 15.21% <0%> (ø) ⬆️
src/client/datascience/debugLocationTracker.ts 78.12% <0%> (ø) ⬆️
src/client/linters/pydocstyle.ts 88.88% <0%> (ø) ⬆️
src/client/common/utils/platform.ts 76.47% <0%> (+5.88%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update be772e1...cd3b287. Read the comment docs.

@@ -54,6 +54,37 @@ export function splitMultilineString(source: nbformat.MultilineString): string[]
return [];
}

export function removeLinesFromFrontAndBack(code: string): string {

Choose a reason for hiding this comment

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

I think its good to add unit tests for this function.

Copy link
Author

Choose a reason for hiding this comment

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

I did. See the tests in cellFactory.unit.test

@rchiodo rchiodo merged commit faf4955 into master Feb 11, 2020
@rchiodo rchiodo deleted the rchiodo/whitespace_interactive branch February 11, 2020 22:22
@lock lock bot locked as resolved and limited conversation to collaborators Feb 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants