isNewlineOnlyOp: Fix regular expression to handle inconsistent deltas
This commit is contained in:
@@ -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 {
|
||||||
|
Reference in New Issue
Block a user