bad parsing of shell code (cat EOF) #4165

Closed
opened 2026-02-05 08:11:48 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @RANDOMLY-OBFUSCATED on GitHub (Sep 10, 2023).

Describe the Bug

When using shell code block (```sh), the last EOF is not correctly reconized and the rest of the cole take the same color of strings previously used.
The only one way I found to work around is to cut the shell block just after the last EOF et reopen a new one at next.
Three instances, same result.

Steps to Reproduce

  1. open a new page
  2. open a new shell block, fill it with a cat EOF block in the middle of the rest of the code

Expected Behaviour

Have the correct syntaxic coloration.

Screenshots or Additional Context

Details

Screenshot_20230910_135110
Screenshot_20230910_135138
Screenshot_20230910_135204
Screenshot_20230910_135230

Browser Details

FF 117.0 - openSUSE 15.4 up to date with Mozzilla repo

Exact BookStack Version

v23.06.2

PHP Version

8.2.8

Hosting Environment

bare metal with PVE, Bookstack is in an openSUSE CT. It was installed and upgraded with git.

Originally created by @RANDOMLY-OBFUSCATED on GitHub (Sep 10, 2023). ### Describe the Bug When using shell code block (```sh), the last EOF is not correctly reconized and the rest of the cole take the same color of strings previously used. The only one way I found to work around is to cut the shell block just after the last `EOF` et reopen a new one at next. Three instances, same result. ### Steps to Reproduce 1. open a new page 2. open a new shell block, fill it with a `cat EOF` block in the middle of the rest of the code ### Expected Behaviour Have the correct syntaxic coloration. ### Screenshots or Additional Context <details><summary>Details</summary> <p> ![Screenshot_20230910_135110](https://github.com/BookStackApp/BookStack/assets/5000101/fe4cb781-9e8d-4d6a-9abc-39afbbbb8022) ![Screenshot_20230910_135138](https://github.com/BookStackApp/BookStack/assets/5000101/c45e9ace-319a-47be-95d1-3c4b4a788758) ![Screenshot_20230910_135204](https://github.com/BookStackApp/BookStack/assets/5000101/c2a29f08-2650-4525-8349-5de5522c0d46) ![Screenshot_20230910_135230](https://github.com/BookStackApp/BookStack/assets/5000101/22862b14-229d-4ba7-bdad-8c4eb28a83b9) </p> </details> ### Browser Details FF 117.0 - openSUSE 15.4 up to date with Mozzilla repo ### Exact BookStack Version v23.06.2 ### PHP Version 8.2.8 ### Hosting Environment bare metal with PVE, Bookstack is in an openSUSE CT. It was installed and upgraded with git.
OVERLORD added the 🐛 Bug label 2026-02-05 08:11:48 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4165