@inject('markdown', 'Parsedown')
@php
// TODO: There should be a better place for this.
$markdown->setSafeMode(true);
@endphp
{{-- Recursion for children --}}
@if($grouped_comments->has($comment->getKey()) && $indentationLevel > $maxIndentationLevel)
{{-- TODO: Don't repeat code. Extract to a new file and include it. --}}
@foreach($grouped_comments[$comment->getKey()] as $child)
@include('comments::_comment', [
'comment' => $child,
'grouped_comments' => $grouped_comments
])
@endforeach
@endif
{{ $comment->commenter->global_name ?? $comment->commenter->username }} - {{ $comment->created_at->diffForHumans() }}
@else{{ $comment->commenter->global_name ?? $comment->commenter->username }} - {{ $comment->created_at->diffForHumans() }}
@endif{{-- Margin bottom --}} {{-- Recursion for children --}} @if($grouped_comments->has($comment->getKey()) && $indentationLevel <= $maxIndentationLevel) {{-- TODO: Don't repeat code. Extract to a new file and include it. --}} @foreach($grouped_comments[$comment->getKey()] as $child)