From e67c4b69d17bd53d8a58cea847e18bc846fe2dd9 Mon Sep 17 00:00:00 2001 From: Bohdan Shulha Date: Thu, 22 Aug 2024 21:06:26 +0200 Subject: [PATCH] feat: convert newlines into br tag --- resources/views/stories/show.blade.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/views/stories/show.blade.php b/resources/views/stories/show.blade.php index 22a0357..0cf6fe8 100644 --- a/resources/views/stories/show.blade.php +++ b/resources/views/stories/show.blade.php @@ -10,32 +10,32 @@ {{ $story->vendor->name }} {{ $story->mood == 'positive' ? '😊' : ($story->mood == 'negative' ? '😠' : '😐') }}

{{ $story->published_at->shortRelativeToNowDiffForHumans() }}

-

{{ $story->summary }}

+

{{ nl2br($story->summary) }}

@if(Str::startsWith($story->source, 'https://x.com')) - Follow original at X (formerly Twitter) + Follow the original story at X (formerly Twitter) @elseif(Str::startsWith($story->source, 'https://www.reddit.com')) - Follow original at Reddit + Follow the original story at Reddit @elseif(Str::startsWith($story->source, 'https://news.ycombinator.com')) - Follow original at HackerNews + Follow the original story at HackerNews @elseif(Str::startsWith($story->source, 'https://medium.com')) - Follow original at Medium + Follow the original story at Medium @else - Read original at {{ parse_url($story->source, PHP_URL_HOST) }} + Follow the original story at {{ parse_url($story->source, PHP_URL_HOST) }} @endif