File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -52,19 +52,19 @@ export class TextHandler {
5252 this . _callback = callback ;
5353 }
5454
55- write ( data : string , last : boolean ) {
56- const dataNewlineFixed = data . replace ( / \r \n / g, '\n' ) ; // just avoid \r\n entirely
55+ write ( _data : string , last : boolean ) {
56+ const data = _data . replace ( / \r \n / g, '\n' ) ; // just avoid \r\n entirely
5757
5858 // Competitive Companion removes trailing spaces for every line
5959 for ( let i = 0 ; i < data . length ; i ++ ) {
60- if ( dataNewlineFixed [ i ] === ' ' ) {
60+ if ( data [ i ] === ' ' ) {
6161 this . _spacesCount ++ ;
62- } else if ( dataNewlineFixed [ i ] === '\n' ) {
62+ } else if ( data [ i ] === '\n' ) {
6363 this . _data += '\n' ;
6464 this . _spacesCount = 0 ;
6565 } else {
6666 this . _data += ' ' . repeat ( this . _spacesCount ) ;
67- this . _data += dataNewlineFixed [ i ] ;
67+ this . _data += data [ i ] ;
6868 this . _spacesCount = 0 ;
6969 }
7070 }
You can’t perform that action at this time.
0 commit comments