Bookstack: Whitespace at the beginning of a sentence is ignored in codeblock.

Created on 5 Nov 2019  路  2Comments  路  Source: BookStackApp/BookStack

Describe the bug
Whitespace at the beginning of a sentence is ignored in codeblock.

Steps To Reproduce
When using markdown

\```bash
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
...
\```

->

displayed

0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
...

Expected behavior
I want it to displayed as I typed.

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): 0.27.5
  • PHP Version: PHP 7.2.19
  • Hosting Method (Nginx/Apache/Docker): Apache/2.4.29
Bug Front-End

Most helpful comment

Thanks for raising @hhk7734.
Have tested and can confirm this is the case.

Also happens on WYSIWYG, but not in the editor itself. Likely to be this line at play:
https://github.com/BookStackApp/BookStack/blob/189a598d560e83e283e8062a73ce8198e5a0553b/resources/js/services/code.js#L102

Have marked to be fixed for the next release.

All 2 comments

Thanks for raising @hhk7734.
Have tested and can confirm this is the case.

Also happens on WYSIWYG, but not in the editor itself. Likely to be this line at play:
https://github.com/BookStackApp/BookStack/blob/189a598d560e83e283e8062a73ce8198e5a0553b/resources/js/services/code.js#L102

Have marked to be fixed for the next release.

Patched in master branch, Will be part of the next feature release (v0.28) due at the end of the year.

Was this page helpful?
0 / 5 - 0 ratings