@extends(backpack_view('blank')) {{-- @php function formatMarkdown($text) { // Split the text by lines $lines = explode("\n", $text); $inList = false; $formattedText = ''; foreach ($lines as $line) { // Check if line starts with "* " (indicating a list item) if (preg_match('/^\* (.+)/', $line, $matches)) { if (!$inList) { // Start the unordered list if not already in one $formattedText .= ''; $inList = false; } // Process other Markdown formatting (bold, italic, code) for non-list lines $line = preg_replace('/\*\*(.*?)\*\*/', '$1', $line); $line = preg_replace('/\*(.*?)\*/', '$1', $line); $line = preg_replace('/`(.*?)`/', '$1', $line); // Add the processed line as is (don't escape HTML) $formattedText .= $line; } } // Close any open list tags at the end of the text if ($inList) { $formattedText .= ''; } return $formattedText; } @endphp --}} @php use League\CommonMark\CommonMarkConverter; $converter = new CommonMarkConverter(); if ($wiki != '') { $html = $converter->convertToHtml($wiki); } else { $html = 'Clone effettuato! La wiki รจ pronta :)'; } @endphp @section('content')

GitHub

@if ($wiki = '') { $html } @else {!! $html !!} @endif
@endsection