Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 't/14590'
  • Loading branch information
Tade0 committed May 18, 2016
2 parents 655faaf + a8f4191 commit 619cd60
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Expand Up @@ -3,6 +3,8 @@ CKEditor 4 Changelog

## CKEditor 4.5.10

* [#14590](http://dev.ckeditor.com/ticket/14590): Fixed: Additional line break appearing after inline elements when switching modes. Thanks to [dpidcock](https://github.com/dpidcock)!

## CKEditor 4.5.9

Fixed Issues:
Expand Down
1 change: 1 addition & 0 deletions plugins/htmlwriter/plugin.js
Expand Up @@ -289,6 +289,7 @@ CKEDITOR.htmlWriter = CKEDITOR.tools.createClass( {
this._.indentation = '';
this._.afterCloser = 0;
this._.inPre = 0;
this._.needsSpace = 0;
},

/**
Expand Down
43 changes: 43 additions & 0 deletions tests/plugins/htmlwriter/htmlwriter.js
@@ -0,0 +1,43 @@
/* bender-tags: editor,unit */
/* bender-ckeditor-plugins: wysiwygarea, htmlwriter */
bender.test( {
'test extra line break': function() {
var data = '<div>Text <strong>inline</strong> Text <p>paragraph</p></div>';

bender.editorBot.create( {
name: 'basic1',
formattedOutput: true,

config: {
allowedContent: true,

on: {
instanceReady: function( evt ) {
evt.editor.dataProcessor.writer.setRules( 'p', {
indent: true,
breakBeforeOpen: true,
breakAfterOpen: true,
breakBeforeClose: true,
breakAfterClose: true
} );

evt.editor.dataProcessor.writer.setRules( 'div', {
indent: true,
breakBeforeOpen: false,
breakAfterOpen: true,
breakBeforeClose: false,
breakAfterClose: true
} );
}
}
}
}, function( bot ) {
bot.setData( data, function() {
var afterFormat = bot.getData( false, false );

// Trigger getData a second time to reveal bug.
assert.areSame( afterFormat, bot.getData( false, false ) );
} );
} );
}
} );

0 comments on commit 619cd60

Please sign in to comment.