r100742 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100741‎ | r100742 | r100743 >
Date:20:46, 25 October 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Made minor fix to prepareInsert to get commit/rollback test 5 working again, and updated the number of tests to 8.
Modified paths:
  • /trunk/parsers/wikidom/lib/hype/models/es.DocumentModel.js (modified) (history)
  • /trunk/parsers/wikidom/tests/hype/es.DocumentModel.test.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/tests/hype/es.DocumentModel.test.js
@@ -499,7 +499,7 @@
500500 );
501501 } );
502502
503 -test( 'es.DocumentModel.commit, es.DocumentModel.rollback', 6, function() {
 503+test( 'es.DocumentModel.commit, es.DocumentModel.rollback', 8, function() {
504504 var documentModel = es.DocumentModel.newFromPlainObject( obj );
505505
506506 var elementAttributeChange = documentModel.prepareElementAttributeChange(
Index: trunk/parsers/wikidom/lib/hype/models/es.DocumentModel.js
@@ -598,7 +598,7 @@
599599 if ( containsStructuralElements( insertedData ) ) {
600600 // TODO
601601 } else {
602 - if ( isStructuralLocation( offset, insertedData ) ) {
 602+ if ( isStructuralLocation( offset, this.data ) ) {
603603 // We're inserting content into a structural location,
604604 // so we need to wrap the inserted content in a paragraph.
605605 insertedData = [ { 'type': 'paragraph' }, { 'type': '/paragraph' } ];

Status & tagging log