Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f22924c
Update tpn distro and 3rd party notices
DonJayamanne Mar 19, 2019
46d4d02
Pin to beta version of PTVSD (#4836)
DonJayamanne Mar 19, 2019
095e210
Add ignore button to the MacInterpreterSelectedAndNoOtherInterpreters…
alinalobast Mar 20, 2019
d180c9c
Generalize test results service (#4813)
Mar 19, 2019
aa2c0ba
Merge branch 'release' of https://github.com/Microsoft/vscode-python …
DonJayamanne Mar 20, 2019
369397c
fix names for run above and run below code lenses (#4879)
IanMatthewHuff Mar 21, 2019
f7a4d53
Fix multiline comments with text on first line. (#4884)
rchiodo Mar 21, 2019
0d96d3a
Cherry-pick 26a7b9c
rchiodo Mar 22, 2019
2412a58
cherry pick from master branch
IanMatthewHuff Mar 22, 2019
76eb5e2
Revert "Revert "Always use the same jedi environment (#4687)" (#4850)"
DonJayamanne Mar 22, 2019
4e44f6d
Update change log entries
DonJayamanne Mar 25, 2019
434567e
Bump ptvsd to 4.2.5 (#4904)
DonJayamanne Mar 25, 2019
6c9b79c
Ensure output panel does not steal focus due to ls errors (#4919)
DonJayamanne Mar 26, 2019
3e314b6
Fix change log
DonJayamanne Mar 26, 2019
d852809
Bump pinned version of Language Server
DonJayamanne Mar 26, 2019
c0f7eca
Release for march 2018 (#4931)
DonJayamanne Mar 26, 2019
1f600d9
Same logic for stable and beta (#4964)
DonJayamanne Mar 27, 2019
095b74c
Point release for March 2018 (#4965)
DonJayamanne Mar 27, 2019
7c041fd
Capture telemetry when tests are disabled (#4997)
DonJayamanne Mar 28, 2019
68316a0
Update change log
DonJayamanne Mar 28, 2019
1738841
March 2019 point release with debugger fixes (#5056)
DonJayamanne Apr 2, 2019
4d1ad28
Point release with fixes for Debugger (#5160)
DonJayamanne Apr 8, 2019
2a0c89f
Track telemetry when switching to and from LS (#5164)
DonJayamanne Apr 8, 2019
106d0b9
Bump language server
DonJayamanne Apr 8, 2019
c6ee732
Merge branch 'release' of https://github.com/Microsoft/vscode-python …
DonJayamanne Apr 8, 2019
e4c1f75
Bump extension version
DonJayamanne Apr 8, 2019
6cda7a3
Merge branch 'release' into mergeRelease3
DonJayamanne Apr 8, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix multiline comments with text on first line. (#4884)
  • Loading branch information
rchiodo committed Mar 21, 2019
commit f7a4d5310c7f9d84de27f20950a1968262859d86
1 change: 1 addition & 0 deletions news/2 Fixes/4791.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Multiline comments with text on the first line break Python Interactive window execution.
12 changes: 11 additions & 1 deletion src/client/datascience/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,17 @@ export function parseForComments(
for (const l of lines) {
const trim = l.trim();
// Multiline is triple quotes of either kind
const isMultiline = trim === '\'\'\'' || trim === '\"\"\"';
const isMultiline = trim.startsWith('\'\'\'') || trim.startsWith('\"\"\"');
if (insideMultiline) {
if (!isMultiline) {
foundCommentLine(l, pos);
} else {
insideMultiline = false;

// Might end with text too
if (trim.length > 3) {
foundNonCommentLine(trim.slice(3), pos);
}
}
} else {
if (!isMultiline) {
Expand All @@ -101,6 +106,11 @@ export function parseForComments(
}
} else {
insideMultiline = true;

// Might end with text too
if (trim.length > 3) {
foundCommentLine(trim.slice(3), pos);
}
}
}
pos += 1;
Expand Down
4 changes: 4 additions & 0 deletions src/test/datascience/datascience.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ suite('Data Science Tests', () => {
assert.equal(cells.length, 1, 'Code cell multline failed');
assert.equal(cells[0].data.cell_type, 'code', 'Code cell not generated');
assert.equal(cells[0].data.source.length, 5, 'Lines for cell not emitted');
cells = generateCells(undefined, '#%% [markdown] \n\"\"\"# a\nb\n\'\'\'', 'foo', 0, true, '1');
assert.equal(cells.length, 1, 'Markdown cell multline failed');
assert.equal(cells[0].data.cell_type, 'markdown', 'Markdown cell not generated');
assert.equal(cells[0].data.source.length, 2, 'Lines for cell not emitted');
});

});