Skip to content

Commit 05af3eb

Browse files
committed
style(json-crdt-extensions): 💄 run Prettier
1 parent 95f519d commit 05af3eb

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

src/json-crdt-extensions/peritext/editor/Editor.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,11 @@ export class Editor<T = string> {
204204
* by the `predicate` is found.
205205
* @returns Point after the last character skipped.
206206
*/
207-
private skipWord(iterator: CharIterator<T>, predicate: CharPredicate<string>, firstLetterFound: boolean): Point<T> | undefined {
207+
private skipWord(
208+
iterator: CharIterator<T>,
209+
predicate: CharPredicate<string>,
210+
firstLetterFound: boolean,
211+
): Point<T> | undefined {
208212
let next: ChunkSlice<T> | undefined;
209213
let prev: ChunkSlice<T> | undefined;
210214
while ((next = iterator())) {
@@ -229,7 +233,11 @@ export class Editor<T = string> {
229233
* matched by the `predicate` is found.
230234
* @returns Point after the last character skipped.
231235
*/
232-
public fwdSkipWord(point: Point<T>, predicate: CharPredicate<string> = isLetter, firstLetterFound: boolean = false): Point<T> {
236+
public fwdSkipWord(
237+
point: Point<T>,
238+
predicate: CharPredicate<string> = isLetter,
239+
firstLetterFound: boolean = false,
240+
): Point<T> {
233241
const firstChar = point.rightChar();
234242
if (!firstChar) return point;
235243
const fwd = this.fwd1(firstChar.id(), firstChar.chunk);
@@ -247,7 +255,11 @@ export class Editor<T = string> {
247255
* matched by the `predicate` is found.
248256
* @returns Point after the last character skipped.
249257
*/
250-
public bwdSkipWord(point: Point<T>, predicate: CharPredicate<string> = isLetter, firstLetterFound: boolean = false): Point<T> {
258+
public bwdSkipWord(
259+
point: Point<T>,
260+
predicate: CharPredicate<string> = isLetter,
261+
firstLetterFound: boolean = false,
262+
): Point<T> {
251263
const firstChar = point.leftChar();
252264
if (!firstChar) return point;
253265
const bwd = this.bwd1(firstChar.id(), firstChar.chunk);

src/json-crdt-extensions/peritext/editor/__tests__/Editor-iterators.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,4 +279,3 @@ describe('.bwd1()', () => {
279279
expect(bools).toStrictEqual([false, true, false]);
280280
});
281281
});
282-
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type {UndefIterator} from "../../../util/iterator";
2-
import type {ChunkSlice} from "../util/ChunkSlice";
1+
import type {UndefIterator} from '../../../util/iterator';
2+
import type {ChunkSlice} from '../util/ChunkSlice';
33

44
export type CharIterator<T> = UndefIterator<ChunkSlice<T>>;
55
export type CharPredicate<T> = (char: T) => boolean;

src/json-crdt-extensions/peritext/editor/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {CharPredicate} from "./types";
1+
import {CharPredicate} from './types';
22

33
const LETTER_REGEX = /(\p{Letter}|\d)/u;
44
const WHITESPACE_REGEX = /\s/;

0 commit comments

Comments
 (0)