File tree Expand file tree Collapse file tree 3 files changed +3
-6
lines changed Expand file tree Collapse file tree 3 files changed +3
-6
lines changed Original file line number Diff line number Diff line change 3
3
{
4
4
"command" : " codeSnippet:save-as-snippet" ,
5
5
"keys" : [" Accel Shift A" ],
6
- "selector" : " .jp-Cell "
6
+ "selector" : " .jp-Notebook "
7
7
},
8
8
{
9
9
"command" : " codeSnippet:save-as-snippet" ,
Original file line number Diff line number Diff line change @@ -535,9 +535,7 @@ export class CodeSnippetDisplay extends React.Component<
535
535
private _setPreviewPosition ( id : string ) : void {
536
536
const intID = parseInt ( id , 10 ) ;
537
537
const realTarget = document . getElementsByClassName ( TITLE_CLASS ) [ intID ] ;
538
- const newTarget = document . getElementsByClassName ( 'jp-codeSnippet-item' ) [
539
- intID
540
- ] ;
538
+ const newTarget = document . getElementsByClassName ( CODE_SNIPPET_ITEM ) [ intID ] ;
541
539
// distDown is the number of pixels to shift the preview down
542
540
const distDown : number = realTarget . getBoundingClientRect ( ) . top - 43 ; //this is bumping it up
543
541
const elementSnippet = newTarget as HTMLElement ;
Original file line number Diff line number Diff line change @@ -169,8 +169,7 @@ function activateCodeSnippet(
169
169
'jp-Cell jp-mod-selected'
170
170
) [ 1 ] ;
171
171
const text = curr as HTMLElement ;
172
- let textContent = text . innerText ;
173
- textContent = textContent . replace ( / \uFFFD / g, '' ) ;
172
+ const textContent = text . innerText ;
174
173
const arrayInput = textContent . split ( '\n' ) ;
175
174
const indexedInput = arrayInput . slice ( 1 ) ;
176
175
for ( let i = 0 ; i < indexedInput . length ; i ++ ) {
You can’t perform that action at this time.
0 commit comments