diff --git a/setup.py b/setup.py index fb23c8c..ac68989 100644 --- a/setup.py +++ b/setup.py @@ -13,12 +13,14 @@ HERE = os.path.abspath(os.path.dirname(__file__)) # The name of the project + name="code_snippet" # Get our version with open(os.path.join(HERE, 'package.json')) as f: version = json.load(f)['version'] + lab_path = os.path.join(HERE, name, "labextension") # Representative files that should exist after a successful build diff --git a/src/index.ts b/src/index.ts index 1e281dd..2a43bc2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -184,7 +184,8 @@ function activateCodeSnippet( //if user just right-clicks cell(s) to save const curr = document.getElementsByClassName('jp-Cell jp-mod-selected'); const resultArray = []; - for (let i = 1; i < curr.length; i++) { + // changed i = 1 to i = 0. + for (let i = 0; i < curr.length; i++) { //loop through each cell const text = curr[i] as HTMLElement; const textContent = text.innerText;