Text following page excerpt is not a separate paragraph
Asked by M_S_:

This has bugged me several times now: I frequently add a page excerpt macro, containing some lines or paragraphs of text, followed by another paragraph of text - outside the excerpt macro body. During edit mode, both elements appear as two separate paragraphs/blocks.

However, when (pre)viewing the content, the excerpt content and following paragraph are just concatenated as illustrated below (see how there is not even any space after the "." as highlighted in red):

![confluence-excerpt-issue.png](/t5/image/serverpage/image-id/68479iEF65A2962FB87D91/image-dimensions/486x314?v=v2 "confluence-excerpt-issue.png")

Is this a defect? Is there a way to have the paragraph following the excerpt block be displayed as a separate paragraph?


Answers:
author: Shannon S
body: Hello M.S.,

Happy to help you with this.

From your example, it appears that you haven't started a new paragraph below your excerpt macro, causing your browser to read it as an inline macro.

Here's my example:

![2019-10-07 13.59.14.gif](https://community.atlassian.com/t5/image/serverpage/image-id/68586i42BB53EEAB31B5B0/image-dimensions/525x307?v=v2 "2019-10-07 13.59.14.gif")

In order to add a new paragraph below your macro, the following steps will ensure you've added enough spacing between the two so that they display as separate blocks.

1. Insert your Excerpt Macro.
2. Type some text into the Excerpt Macro.
3. Hit your right arrow key, and it'll place the cursor immediately after the macro.
4. Hit ENTER/RETURN on your keyboard.
5. Type the text below the macro.

You can see that when I hit the back key after creating a new paragraph, it removes the first line and there's less space between the macro and the new paragraph. This will display as a single inline paragraph.

I hope that's clear, but let me know if you have any trouble.

Regards,

Shannon

comments: author: M_S_
body: While this approach appears to result in the correct rendering, I still suspect that there is an error below this.

Looking at the storage format, your approach results in

```
<ac:structured-macro ac:macro-id="1806ae63-dc22-4c44-a756-fbdf43724ffd" ac:name="excerpt" ac:schema-version="1">
...
</ac:structured-macro>
<p>
<br/>
</p>
<p>Cum sociis natoque penatibus...
```

So there is an additional \<p\>\<br/\>\</p\>, while in reality, the following text is already wrapped in \<p\> and should therefore display as its own paragraph.


author: Shannon S
body: Hello M.S.

To be clear, you used my recommendation, received the results in the above storage format, and the Latin text below the additional \<p\>\<br/\>\</p\> does ***not*** appear in its own paragraph? Could you show me how it looks on your page when you used my approach?

Secondly, can you show me what the source looks like when you originally inserted the macro?

Could you let me know the steps you took for it to look like that?

Regards,

Shannon


author: M_S_
body: No, I did follow you recommendation, the (blind, not latin) text below the additional \<p\>\<br/\>\</p\> **does** display in its own paragraph. That part is ok.

However, looking at the storage format, it bugs me that the "separator" \<p\>\<br/\>\</p\> is needed to achieve the desired result, as the following text is already wrapped in \<p\>...\</p\> -- shouldn't this result in the text being displayed in its own paragraph, even without the preceding "separator"?

Actually, when I manually change the excerpt's atlassian-macro-output-type to BLOCK (instead of INLINE) in the storage format, then it seems do display fine as well, even without the separator. However, this option does not seem to be available from the UI.

Bottom line: your way does result in the correct display, however it seems more than what the storage format would suggest.


Tags: confluence-server

server