New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Blocks are not getting wrapped in revision diffs #888

watschi opened this Issue Jun 15, 2018 · 2 comments


3 participants

watschi commented Jun 15, 2018

  • BookStack Version (Found in settings, Please don't put 'latest'): v0.22.0
  • PHP Version: PHP 7.0.30-0ubuntu0.16.04.1
  • MySQL Version: mysql Ver 15.1 Distrib 10.0.34-MariaDB, for debian-linux-gnu (x86_64)
Expected Behavior

When viewing diffs of different site revisions code blocks should get wrapped

Current Behavior

Code blocks don't get rendered correctly when viewing a diff

Steps to Reproduce

Change something in a code block an view the changes in revision history



@watschi watschi changed the title from Code Blocks not getting wraped in revision diffs to Code Blocks are not getting wrapped in revision diffs Jun 16, 2018


This comment has been minimized.


Abijeet commented Jun 17, 2018

Can reproduce on demo. I think codemirror is not being initialized on revision pages.

@Abijeet Abijeet added the Bug label Jun 17, 2018


This comment has been minimized.


ssddanbrown commented Jun 17, 2018

Yeah, Codemirror instances won't run on diffs but I don't think they should in that case since it'll remove any diff highlighting which I'd consider more important in this view.

I think instead we just need to add styling to wrap these on diffs. I think we already do this for exports.

Abijeet added a commit that referenced this issue Jun 30, 2018

Fixes issue with code not wrapping on revision page.
Closes #888

Signed-off-by: Abijeet <>

@ssddanbrown ssddanbrown added this to the BookStack Beta v0.23.0 milestone Jul 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment