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
*/