Code snippet appearing as single line in edit mode #2856

Closed
opened 2026-02-05 05:28:31 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @monabomble on GitHub (Jun 17, 2022).

Describe the Bug

With the latest release (22.04.2), it appears a bug has been introduced within the edit UI.
When I enter a code snippet (CTRL-SHIFT-E) and hit 'Save Code' the snippet is displayed as one single line. If I either save the page at that point OR open the code snippet editor and hit 'Save Code' a second time, the snippet is displayed correctly (multiple lines).

Steps to Reproduce

  1. Start editing any page
  2. Open a new code snippet editor with CTRL-E
  3. enter a multi-line snippet
  4. Click 'Save Code'
  5. The code snippet with be displayed as a single line

Expected Behaviour

Even whilst editing a page a multi-line code snippet would appear as multiple lines and not one single line.

Screenshots or Additional Context

edit_code
view

Browser Details

Firefox 100.0.2 (64-bit) on Pop!_OS 22.04 LTS

Exact BookStack Version

v22.0.4.2

PHP Version

No response

Hosting Environment

We are using the LinuxServer Docker image. Specifically:

linuxserver/bookstack latest ed4f031b5e08

Originally created by @monabomble on GitHub (Jun 17, 2022). ### Describe the Bug With the latest release (22.04.2), it appears a bug has been introduced within the edit UI. When I enter a code snippet (CTRL-SHIFT-E) and hit 'Save Code' the snippet is displayed as one single line. If I either save the page at that point OR open the code snippet editor and hit 'Save Code' a second time, the snippet is displayed correctly (multiple lines). ### Steps to Reproduce 1. Start editing any page 2. Open a new code snippet editor with CTRL-E 3. enter a multi-line snippet 4. Click 'Save Code' 5. The code snippet with be displayed as a single line ### Expected Behaviour Even whilst editing a page a multi-line code snippet would appear as multiple lines and not one single line. ### Screenshots or Additional Context ![edit_code](https://user-images.githubusercontent.com/64267954/174308277-5e77ee3a-1b77-428c-8852-edc46b3beade.png) ![view](https://user-images.githubusercontent.com/64267954/174308323-5e80d138-a641-4460-9a0e-957d7e569fb7.png) ### Browser Details Firefox 100.0.2 (64-bit) on Pop!_OS 22.04 LTS ### Exact BookStack Version v22.0.4.2 ### PHP Version _No response_ ### Hosting Environment We are using the LinuxServer Docker image. Specifically: linuxserver/bookstack latest ed4f031b5e08
OVERLORD added the 🐛 Bug label 2026-02-05 05:28:31 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jun 17, 2022):

Thanks for reporting @monabomble. Can confirm this behaviour. Have assigned to be fixed for the next feature release.

@ssddanbrown commented on GitHub (Jun 17, 2022): Thanks for reporting @monabomble. Can confirm this behaviour. Have assigned to be fixed for the next feature release.
Author
Owner

@monabomble commented on GitHub (Jun 21, 2022):

Thank you Dan!

On Tue, 21 Jun 2022, 12:02 Dan Brown, @.***> wrote:

Closed #3507 https://github.com/BookStackApp/BookStack/issues/3507 as
completed via 9dd69b0
https://github.com/BookStackApp/BookStack/commit/9dd69b04b8bcb32abe9db60627a52690629bcb52
.


Reply to this email directly, view it on GitHub
https://github.com/BookStackApp/BookStack/issues/3507#event-6846412879,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/APKKNMQLI7C3LQVJJM567CDVQGONVANCNFSM5ZCJW42A
.
You are receiving this because you were mentioned.Message ID:
@.***>

@monabomble commented on GitHub (Jun 21, 2022): Thank you Dan! On Tue, 21 Jun 2022, 12:02 Dan Brown, ***@***.***> wrote: > Closed #3507 <https://github.com/BookStackApp/BookStack/issues/3507> as > completed via 9dd69b0 > <https://github.com/BookStackApp/BookStack/commit/9dd69b04b8bcb32abe9db60627a52690629bcb52> > . > > — > Reply to this email directly, view it on GitHub > <https://github.com/BookStackApp/BookStack/issues/3507#event-6846412879>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/APKKNMQLI7C3LQVJJM567CDVQGONVANCNFSM5ZCJW42A> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> >
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2856