From c1e65c2149a5764e05548819e6458819559455de Mon Sep 17 00:00:00 2001 From: Scott Davey Date: Tue, 24 Sep 2024 16:55:19 +1000 Subject: [PATCH] Addressed PHP 8.3 deprecation notices --- src/Converter.php | 11 +++++++---- src/ConverterExtra.php | 15 +++++++++++++++ 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/Converter.php b/src/Converter.php index f157323..eae6afa 100644 --- a/src/Converter.php +++ b/src/Converter.php @@ -227,6 +227,11 @@ class Converter */ protected $indent = ''; + /** + * @var string + */ + private string $previousIndent = ''; + /** * constructor, set options, setup parser * @@ -534,8 +539,7 @@ protected function handleTagToText() // don't indent inside
 tags
                     if ($this->parser->tagName == 'pre') {
                         $this->out($this->parser->node);
-                        static $indent;
-                        $indent = $this->indent;
+                        $this->previousIndent = $this->indent;
                         $this->indent = '';
                     } else {
                         $this->out($this->parser->node . "\n" . $this->indent);
@@ -556,8 +560,7 @@ protected function handleTagToText()
                     } else {
                         // reset indentation
                         $this->out($this->parser->node);
-                        static $indent;
-                        $this->indent = $indent;
+                        $this->indent = $this->previousIndent;
                     }
 
                     if (in_array($this->parent(), ['ins', 'del'])) {
diff --git a/src/ConverterExtra.php b/src/ConverterExtra.php
index 838672a..c80b8fb 100644
--- a/src/ConverterExtra.php
+++ b/src/ConverterExtra.php
@@ -26,6 +26,21 @@ class ConverterExtra extends Converter
      */
     protected $row = 0;
 
+    /**
+     * @var string
+     */
+    private $tableLookaheadHeader = '';
+
+    /**
+     * @var string
+     */
+    private $tdSubstitute = '';
+
+    /**
+     * @var string
+     */
+    private $tableLookaheadBody = '';
+
     /**
      * constructor, see Markdownify::Markdownify() for more information
      */