Skip to content

Commit 407d388

Browse files
authored
Merge pull request #153 from kpinnipa/saveCellFix
Fix right-click to save cell(s) error.
2 parents e99edcb + 5861d82 commit 407d388

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@
1313
HERE = os.path.abspath(os.path.dirname(__file__))
1414

1515
# The name of the project
16+
1617
name="code_snippet"
1718

1819
# Get our version
1920
with open(os.path.join(HERE, 'package.json')) as f:
2021
version = json.load(f)['version']
2122

23+
2224
lab_path = os.path.join(HERE, name, "labextension")
2325

2426
# Representative files that should exist after a successful build

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,8 @@ function activateCodeSnippet(
184184
//if user just right-clicks cell(s) to save
185185
const curr = document.getElementsByClassName('jp-Cell jp-mod-selected');
186186
const resultArray = [];
187-
for (let i = 1; i < curr.length; i++) {
187+
// changed i = 1 to i = 0.
188+
for (let i = 0; i < curr.length; i++) {
188189
//loop through each cell
189190
const text = curr[i] as HTMLElement;
190191
const textContent = text.innerText;

0 commit comments

Comments
 (0)