Spacing when reusing content #3493

Closed
opened 2026-02-05 06:53:38 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @kool2zero on GitHub (Feb 7, 2023).

Describe the Bug

It appears when reusing content via the include tags, an extra set of paragraph tags (<p></p>) gets added above (maybe within) the include.
This make the spacing seem a little off.... It does not appear to be in the "Source code" but when the page is saved and the source code is viewed it does show up.

Steps to Reproduce

  • New Page
  • Create a header (or collapsible block)
  • Place include tag under the header or within the block.
  • Extra paragraph tag

Expected Behaviour

  • New Page
  • Create a header (or collapsible block)
  • Place include tag under the header or within the block.
  • No Extra paragraph tag

Screenshots or Additional Context

image
image
image
image

image

Browser Details

Chrome 109 on Windows 11

Exact BookStack Version

23.01

PHP Version

8.1.6

Hosting Environment

BookStack on Windows - https://www.youtube.com/watch?v=_v-4BhVz7OI

Originally created by @kool2zero on GitHub (Feb 7, 2023). ### Describe the Bug It appears when reusing content via the include tags, an extra set of paragraph tags (<code>\<p>\</p></code>) gets added above (maybe within) the include. This make the spacing seem a little off.... It does not appear to be in the "Source code" but when the page is saved and the source code is viewed it does show up. ### Steps to Reproduce - New Page - Create a header (or collapsible block) - Place include tag under the header or within the block. - Extra paragraph tag ### Expected Behaviour - New Page - Create a header (or collapsible block) - Place include tag under the header or within the block. - No Extra paragraph tag ### Screenshots or Additional Context ![image](https://user-images.githubusercontent.com/1233609/217314327-ea7f68d0-5301-4ebc-bb71-144e32c6180c.png) ![image](https://user-images.githubusercontent.com/1233609/217314128-cbc4b63f-032f-4689-bf51-0d80b810ad3c.png) ![image](https://user-images.githubusercontent.com/1233609/217314199-01bc3440-fb39-4bf1-ac51-fbbcbaed0bad.png) ![image](https://user-images.githubusercontent.com/1233609/217314420-a3a9b2bb-4e5d-49a2-8365-363e45b35548.png) ![image](https://user-images.githubusercontent.com/1233609/217315672-a39355f9-fd13-46d5-b002-dbbe237065f8.png) ### Browser Details Chrome 109 on Windows 11 ### Exact BookStack Version 23.01 ### PHP Version 8.1.6 ### Hosting Environment BookStack on Windows - https://www.youtube.com/watch?v=_v-4BhVz7OI
OVERLORD added the 🐛 Bug:cat2:🐈 Possible duplicate labels 2026-02-05 06:53:38 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Feb 7, 2023):

Thanks for raising, but I'm going to close this off as a duplicate since it's already been raised within #3385.

@ssddanbrown commented on GitHub (Feb 7, 2023): Thanks for raising, but I'm going to close this off as a duplicate since it's already been raised within #3385.
Author
Owner

@kool2zero commented on GitHub (Mar 8, 2023):

Just putting this here for posterity. I was able to use CSS to remove the extra lines. I noticed in a CSS file someone was specifically setting p:empty to 1.5em so hopefully I haven't broken anything. Thanks for the help as usually.

I placed this in the Custom HTML Head Content section of settings under Customization.
p:empty { margin: 0px; display: none; }

@kool2zero commented on GitHub (Mar 8, 2023): Just putting this here for posterity. I was able to use CSS to remove the extra lines. I noticed in a CSS file someone was specifically setting p:empty to 1.5em so hopefully I haven't broken anything. Thanks for the help as usually. I placed this in the Custom HTML Head Content section of settings under Customization. `p:empty { margin: 0px; display: none; }`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3493