File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
src/json-crdt-extensions/peritext Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -186,7 +186,6 @@ describe('slices', () => {
186186 expect ( point3 . layers [ 1 ] . data ( ) ) . toStrictEqual ( { bold : true } ) ;
187187 const point4 = next ( point3 ) ! ;
188188 expect ( point4 . layers . length ) . toBe ( 0 ) ;
189- console . log ( peritext + '' ) ;
190189 } ) ;
191190
192191 test ( 'one char slice should correctly sort overlay points' , ( ) => {
Original file line number Diff line number Diff line change @@ -101,9 +101,9 @@ export class Cursor<T = string> extends Range<T> implements Slice<T> {
101101 // ---------------------------------------------------------------- Printable
102102
103103 public toString ( tab : string = '' ) : string {
104- const text = JSON . stringify ( this . text ( ) ) ;
104+ const text = this . text ( ) ;
105105 const focusIcon = this . anchorSide === CursorAnchor . Start ? '.→|' : '|←.' ;
106106 const main = `${ this . constructor . name } ${ super . toString ( tab + ' ' , true ) } ${ focusIcon } ` ;
107- return main + printTree ( tab , [ ( ) => text ] ) ;
107+ return main + ( text . length > 32 ? printTree ( tab , [ ( ) => JSON . stringify ( text ) ] ) : '' ) ;
108108 }
109109}
You can’t perform that action at this time.
0 commit comments