To replicate:

      Create a page with this content:

      {excerpt}
      This is a test.
      {excerpt}
      
      Another line.
      

      When saving the page, the space between the two lines will be removed.

      Add a title to the top of the page like so:

      h2. This is a title.
      
      {excerpt}
      This is a test.
      {excerpt}
      
      Another line.
      

      ... and the gap will render properly.

      Verified in Safari and Firefox.

            [CONFSERVER-25927] Excerpt macro removes white space between lines

            Brett Ryan added a comment -

            Here's a hack to fix this. Note that this macro is currently broken, both because it doesn't create valid HTML syntax, but also because the "Display Inline" option just doesn't work.

            HACK:

            1. Go to Confluence Admin > Custom HTML.
            2. Click Edit
            3. Enter the following code fragment.

            <script>
            (function($) {
              $(function() {
                $(".wiki-content").contents().filter(function() {
                  return this.nodeType == 3;
                }).replaceWith(function () {
                  var n = $(this).text().trim();
                  return (!n) ? "" : "<p>" + n + "</p>";
                });
              });
            })(AJS.$);
            </script>
            

            It won't fix the inlining problem, but it will turn the text node into a <p> node.

            In case your wondering, <div> elements are NOT allowed to contain text nodes directly as it has a flow content model while <p> has a phrasing content model.

            Brett Ryan added a comment - Here's a hack to fix this. Note that this macro is currently broken, both because it doesn't create valid HTML syntax, but also because the "Display Inline" option just doesn't work. HACK: 1. Go to Confluence Admin > Custom HTML. 2. Click Edit 3. Enter the following code fragment. <script> (function($) { $(function() { $( ".wiki-content" ).contents().filter(function() { return this.nodeType == 3; }).replaceWith(function () { var n = $(this).text().trim(); return (!n) ? "" : " <p> " + n + " </p> "; }); }); })(AJS.$); </script> It won't fix the inlining problem, but it will turn the text node into a <p> node. In case your wondering, <div> elements are NOT allowed to contain text nodes directly as it has a flow content model while <p> has a phrasing content model.

            Brett Ryan added a comment -

            Actually shaffenden, I don't think that's really acceptable. This macro is actually creating invalid HTML and should be addressed.

            I can't understand why parts of confluence contains bugs that can not be resolved by end users and keep gettig closed as won't fix.

            Bugger it, I'll come up with a hack to fix this for everyone, seems I'm always coming up with hacks to fix bugs in confluence that shouldn't be there.

            Brett Ryan added a comment - Actually shaffenden , I don't think that's really acceptable. This macro is actually creating invalid HTML and should be addressed. I can't understand why parts of confluence contains bugs that can not be resolved by end users and keep gettig closed as won't fix. Bugger it, I'll come up with a hack to fix this for everyone, seems I'm always coming up with hacks to fix bugs in confluence that shouldn't be there.

            Hi there

            Thanks for taking the time to raise and comment on this issue. This has been on the backlog now for quite some time with little progress being made. Rather than leave this here I'm going to close this issue as won't fix. I believe this better reflects the status of this issue.

            If the problem is raised again in the future we'll readdress it.

            Regards
            Steve Haffenden
            Confluence Bugmaster
            Atlassian

            Steve Haffenden (Inactive) added a comment - Hi there Thanks for taking the time to raise and comment on this issue. This has been on the backlog now for quite some time with little progress being made. Rather than leave this here I'm going to close this issue as won't fix. I believe this better reflects the status of this issue. If the problem is raised again in the future we'll readdress it. Regards Steve Haffenden Confluence Bugmaster Atlassian

            As commented on CONF-25930, we're currently on Confluence 5.3.1, and seeing this issue. The visual effect is quite bothersome, and it seems like it should be reasonably simple to address. Any hope of seeing a fix soon?

            Kavian Moradhassel added a comment - As commented on CONF-25930 , we're currently on Confluence 5.3.1, and seeing this issue. The visual effect is quite bothersome, and it seems like it should be reasonably simple to address. Any hope of seeing a fix soon?

              shaffenden Steve Haffenden (Inactive)
              mseager Michael S
              Affected customers:
              2 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: