isNewlineOnlyOp: Fix regular expression to handle inconsistent deltas
This commit is contained in:
parent
ff9e95053d
commit
adc0fb9d0d
1 changed files with 1 additions and 1 deletions
|
@ -61,7 +61,7 @@ function isAllNewlines(ops: Array<Op>): boolean {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isNewlineOnlyOp(op: Op): boolean {
|
export function isNewlineOnlyOp(op: Op): boolean {
|
||||||
return isString(op.insert) && /^\n+$/gm.test(op.insert);
|
return isString(op.insert) && /^\n+$/g.test(op.insert);
|
||||||
}
|
}
|
||||||
|
|
||||||
export class FormattingMenu {
|
export class FormattingMenu {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue