{{$book->name}}
-
{!! $book->descriptionHtml() !!}
+{!! $book->descriptionHtml() !!}
@if(count($bookChildren) > 0)
@foreach($bookChildren as $childElement)
diff --git a/resources/views/chapters/show.blade.php b/resources/views/chapters/show.blade.php
index 6fe1ce431..45e43ad96 100644
--- a/resources/views/chapters/show.blade.php
+++ b/resources/views/chapters/show.blade.php
@@ -24,7 +24,7 @@
{{ $chapter->name }}
-
{!! $chapter->descriptionHtml() !!}
+{!! $chapter->descriptionHtml() !!}
@if(count($pages) > 0)
@foreach($pages as $page)
diff --git a/resources/views/shelves/show.blade.php b/resources/views/shelves/show.blade.php
index e475a8080..11baccaf4 100644
--- a/resources/views/shelves/show.blade.php
+++ b/resources/views/shelves/show.blade.php
@@ -28,7 +28,7 @@
-
{!! $shelf->descriptionHtml() !!}
+{!! $shelf->descriptionHtml() !!}
@if(count($sortedVisibleShelfBooks) > 0)
@if($view === 'list')
diff --git a/tests/Entity/BookShelfTest.php b/tests/Entity/BookShelfTest.php
index 7f6542d5c..fb9862931 100644
--- a/tests/Entity/BookShelfTest.php
+++ b/tests/Entity/BookShelfTest.php
@@ -403,4 +403,15 @@ class BookShelfTest extends TestCase
$resp = $this->asEditor()->get($shelf->getUrl('/create-book'));
$this->withHtml($resp)->assertElementContains('form a[href="' . $shelf->getUrl() . '"]', 'Cancel');
}
+
+ public function test_show_view_displays_description_if_no_description_html_set()
+ {
+ $shelf = $this->entities->shelf();
+ $shelf->description_html = '';
+ $shelf->description = "My great\ndescription\n\nwith newlines";
+ $shelf->save();
+
+ $resp = $this->asEditor()->get($shelf->getUrl());
+ $resp->assertSee("
My great
\ndescription
\n
\nwith newlines
My great
\ndescription
\n
\nwith newlines
My great
\ndescription
\n
\nwith newlines