﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
14590	HtmlWriter adds extra line break after inline tag inserted	David Pidcock		"== Steps to reproduce ==

1.  Start with Html as follows: 
{{{
<div>
  Some text goes here.
  <p>
     A paragraph.
  </p>
</div>
}}}


2.  In Source, verify that there is a single line-break after the first line of text, before the <p> tag

3. Switch to WYSIWYG,  select the word ""text"" and hit the [B]old button, then switch back to Source mode.

== Expected result ==
{{{
<div>
  Some <strong>text<strong> goes here.
  <p>
     A paragraph.
  </p>
</div>
}}}

== Actual result ==
{{{
<div>
  Some <strong>text<strong> goes here.

  <p>
     A paragraph.
  </p>
</div>
}}}

Note that there is an extra line break between ""here"" and the <p> tag. 

The extra line is added by htmlwriter.js @ line 120

{{{#!javascript
if ( this._.afterCloser && rules && rules.needsSpace && this._.needsSpace )
	this._.output.push( '\n' );
}}}
This appears to be because this._.afterCloser doesn't distinguish between inline and block tags. 

Impact is low for most purposes, but I have a project that integrates with CKeditor which uses <span> tags to mark positions (similar to bookmarks) in the document, and this extra line break is throwing off our dirty-detection (which strips out our spans before comparing)"	Bug	closed	Normal	CKEditor 4.5.10	Core : Output Data		fixed		
