<br></br> is used as newline in code blocks in markdown export #2705

Closed
opened 2026-02-05 04:52:05 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @Szwendacz99 on GitHub (Mar 13, 2022).

Originally assigned to: @ssddanbrown on GitHub.

Describe the Bug

When exporting page to markdown, new lines in code blocks are made with <br></br> tag, and it is obviously not being interpreted in any markdown viewer, so every code block end up as single line object with <br></br> tags inside

Steps to Reproduce

  1. Create multi-line code block on a page
  2. export page as markdown

Expected Behaviour

Proper newline character is used inside code blocks.

Screenshots or Additional Context

image

Browser Details

No response

Exact BookStack Version

v22.02.3

PHP Version

8.0

Hosting Environment

Ubuntu-based docker containers

Originally created by @Szwendacz99 on GitHub (Mar 13, 2022). Originally assigned to: @ssddanbrown on GitHub. ### Describe the Bug When exporting page to markdown, new lines in code blocks are made with` <br></br>` tag, and it is obviously not being interpreted in any markdown viewer, so every code block end up as single line object with `<br></br>` tags inside ### Steps to Reproduce 1. Create multi-line code block on a page 2. export page as markdown ### Expected Behaviour Proper newline character is used inside code blocks. ### Screenshots or Additional Context ![image](https://user-images.githubusercontent.com/68295743/158066807-3592132c-043e-4df7-9c5f-f341110ec6d2.png) ### Browser Details _No response_ ### Exact BookStack Version v22.02.3 ### PHP Version 8.0 ### Hosting Environment Ubuntu-based docker containers
OVERLORD added the 🐛 Bug📝 WYSIWYG Editor labels 2026-02-05 04:52:05 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Mar 23, 2022):

This has now been addressed in dd7463259a and will be a part of the next feature release.
This was caused by behaviour of the WYSIYG editor, it means that an affected page may have to be edited/re-saved for it to be "fixed" by this change.

Thanks @Szwendacz99 for reporting.

@ssddanbrown commented on GitHub (Mar 23, 2022): This has now been addressed in dd7463259ad1f6384807616fe967e373003f3d69 and will be a part of the next feature release. This was caused by behaviour of the WYSIYG editor, it means that an affected page may have to be edited/re-saved for it to be "fixed" by this change. Thanks @Szwendacz99 for reporting.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2705