Index: trunk/parsers/wikidom/tests/hype/es.DocumentModel.test.js |
— | — | @@ -499,7 +499,7 @@ |
500 | 500 | ); |
501 | 501 | } ); |
502 | 502 | |
503 | | -test( 'es.DocumentModel.commit, es.DocumentModel.rollback', 6, function() { |
| 503 | +test( 'es.DocumentModel.commit, es.DocumentModel.rollback', 8, function() { |
504 | 504 | var documentModel = es.DocumentModel.newFromPlainObject( obj ); |
505 | 505 | |
506 | 506 | var elementAttributeChange = documentModel.prepareElementAttributeChange( |
Index: trunk/parsers/wikidom/lib/hype/models/es.DocumentModel.js |
— | — | @@ -598,7 +598,7 @@ |
599 | 599 | if ( containsStructuralElements( insertedData ) ) { |
600 | 600 | // TODO |
601 | 601 | } else { |
602 | | - if ( isStructuralLocation( offset, insertedData ) ) { |
| 602 | + if ( isStructuralLocation( offset, this.data ) ) { |
603 | 603 | // We're inserting content into a structural location, |
604 | 604 | // so we need to wrap the inserted content in a paragraph. |
605 | 605 | insertedData = [ { 'type': 'paragraph' }, { 'type': '/paragraph' } ]; |