From 15df427fe4a0b484a073982a99c74a43e12657c1 Mon Sep 17 00:00:00 2001 From: Jonathan Anderson Date: Tue, 20 Jun 2023 13:03:06 -0400 Subject: [PATCH] Cleanup: Remove some dead code --- src/CommonMark/Preprocessor.php | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/CommonMark/Preprocessor.php b/src/CommonMark/Preprocessor.php index 1badafc..6e428e8 100644 --- a/src/CommonMark/Preprocessor.php +++ b/src/CommonMark/Preprocessor.php @@ -34,21 +34,6 @@ public function __invoke(string $markdown): string $markdown = $this->handleDirective($markdown, $regex, fn (string $directive) => [$this, $handler]($directive)); } return $markdown; - $cursor = new Cursor($markdown); - - $preparsed = $cursor->getPreviousText(); - while ($include = $cursor->match(self::REGEX_INCLUDE)) { - $matchLen = mb_strlen($include, 'UTF-8'); - $preparsed .= mb_substr($cursor->getPreviousText(), 0, -$matchLen); - - $quote1 = mb_strpos($include, '"'); - $quote2 = mb_strrpos($include, '"'); - $args = array_map('trim', explode(",", mb_substr($include, $quote2 + 1))); - $preparsed .= $this->fetch(mb_substr($include, $quote1 + 1, $quote2 - $quote1 - 1), $args); - } - $preparsed .= $cursor->getRemainder(); - - return $preparsed; } /**