From 0dfc263c3a834b0e0c2b76437630e43732ea2194 Mon Sep 17 00:00:00 2001 From: Brent Roose Date: Fri, 12 Apr 2024 09:38:09 +0200 Subject: [PATCH] Fallback for preg JIT exhaustion --- src/IsInjection.php | 2 +- tests/targets/test.md | 284 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 283 insertions(+), 3 deletions(-) diff --git a/src/IsInjection.php b/src/IsInjection.php index 01e757f..2d0cd8c 100644 --- a/src/IsInjection.php +++ b/src/IsInjection.php @@ -36,6 +36,6 @@ public function parse(string $content, Highlighter $highlighter): string subject: $content, ); - return $result; + return $result ?? $content; } } diff --git a/tests/targets/test.md b/tests/targets/test.md index 44329b8..8143eff 100644 --- a/tests/targets/test.md +++ b/tests/targets/test.md @@ -1,3 +1,283 @@ -```php -'media_model' => Spatie\MediaLibrary\MediaCollections\Models\Media::class, +```html + ``` \ No newline at end of file