|
|
@@ -126,9 +126,9 @@ describe( 'BlockQuoteCommand', () => {
|
|
|
'(because mQ is not allowed in its parent)',
|
|
|
() => {
|
|
|
model.schema.on( 'checkChild', ( evt, args ) => {
|
|
|
- const rule = model.schema.getRule( args[ 1 ] );
|
|
|
+ const def = model.schema.getDefinition( args[ 1 ] );
|
|
|
|
|
|
- if ( rule.name == 'blockQuote' ) {
|
|
|
+ if ( def.name == 'blockQuote' ) {
|
|
|
evt.stop();
|
|
|
evt.return = false;
|
|
|
}
|
|
|
@@ -381,10 +381,10 @@ describe( 'BlockQuoteCommand', () => {
|
|
|
// blockQuote is allowed in root, but fooBlock can not be inside blockQuote.
|
|
|
model.schema.register( 'fooBlock', { inheritAllFrom: '$block' } );
|
|
|
model.schema.on( 'checkChild', ( evt, args ) => {
|
|
|
- const rule = model.schema.getRule( args[ 1 ] );
|
|
|
+ const def = model.schema.getDefinition( args[ 1 ] );
|
|
|
const ctx = args[ 0 ];
|
|
|
|
|
|
- if ( ctx.matchEnd( 'blockQuote' ) && rule.name == 'fooBlock' ) {
|
|
|
+ if ( ctx.endsWith( 'blockQuote' ) && def.name == 'fooBlock' ) {
|
|
|
evt.stop();
|
|
|
evt.return = false;
|
|
|
}
|