{{ $title }}
-attrsAsString()}class='{$block->classes}' style='{$block->styles}'>{$block->highlighted}";
+ $inner .= sprintf("%s", $block->attrsAsString(), $block->classes, $block->styles, $block->highlighted);
}
- return "$inner"; + return sprintf('
%s', $inner); }; } - abstract protected function codeNodes(): array; - - abstract protected function getLiteralContent($node): string; - /** * Bind into a Commonmark V1 or V2 environment. */ @@ -117,6 +117,8 @@ protected function renderNode($node): mixed return call_user_func($renderer, static::$torchlightBlocks[$hash]); } + + return null; } protected function getContent($node): string @@ -128,7 +130,7 @@ protected function getContent($node): string return $content; } - $file = trim(Str::after($content, '<<<')); + $file = mb_trim(Str::after($content, '<<<')); // It must be only one line, because otherwise it might be a heredoc. if (count(explode("\n", $file)) > 1) { diff --git a/app/Markdown/MarkdownHelper.php b/app/Markdown/MarkdownHelper.php index 6a15c581..90874ac2 100644 --- a/app/Markdown/MarkdownHelper.php +++ b/app/Markdown/MarkdownHelper.php @@ -73,6 +73,7 @@ public static function replaceCodePenTag(string $html, array $tagArray, string $ if (isset($tagArray[3]) && $tagArray[3] !== '%}') { $defaultTag = $tagArray[3]; } + $codepenEmbed = ''; $html = str_replace($original_string, $codepenEmbed, $html); } diff --git a/app/Models/Activity.php b/app/Models/Activity.php index bb82dc18..3f30feef 100644 --- a/app/Models/Activity.php +++ b/app/Models/Activity.php @@ -4,41 +4,24 @@ namespace App\Models; -use Database\Factories\ActivityFactory; -use Illuminate\Database\Eloquent\Builder; +use Carbon\CarbonInterface; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\MorphTo; -use Illuminate\Support\Carbon; use Illuminate\Support\Collection; /** - * @property int $id - * @property string $subject_type - * @property int $subject_id - * @property string $type - * @property array|null $data - * @property int $user_id - * @property Carbon $created_at - * @property Carbon $updated_at + * @property-read int $id + * @property-read string $subject_type + * @property-read int $subject_id + * @property-read string $type + * @property-read array
{{ $title }}
-