File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -189,13 +189,17 @@ function activateCodeSnippet(
189189 'jp-Cell jp-mod-selected'
190190 ) [ 1 ] ;
191191 const text = curr as HTMLElement ;
192- const textContent = text . innerText ;
192+ let textContent = text . innerText ;
193+ textContent = textContent . replace ( / \uFFFD / g, '' ) ;
193194 const arrayInput = textContent . split ( '\n' ) ;
194195 const indexedInput = arrayInput . slice ( 1 ) ;
195- // console.log(textContent);
196- // for (let i = 0; i < indexedInput.length; i++) {
197- // console.log(indexedInput[i]);
198- // }
196+ for ( let i = 0 ; i < indexedInput . length ; i ++ ) {
197+ for ( let j = 0 ; j < indexedInput [ i ] . length ; j ++ ) {
198+ if ( indexedInput [ i ] . charCodeAt ( j ) === 8203 ) {
199+ indexedInput [ i ] = '' ;
200+ }
201+ }
202+ }
199203 CodeSnippetInputDialog ( codeSnippetWidget , indexedInput , - 1 ) ;
200204 } else {
201205 CodeSnippetInputDialog (
You can’t perform that action at this time.
0 commit comments