From 80218c32e914b134ee7b5ed6a810bb82006c4dac Mon Sep 17 00:00:00 2001 From: metalinspired Date: Thu, 8 Feb 2024 14:13:47 +0100 Subject: [PATCH] Change private methods to protected --- src/HtmlConverter.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/HtmlConverter.php b/src/HtmlConverter.php index 944cb08..bfb1d8f 100644 --- a/src/HtmlConverter.php +++ b/src/HtmlConverter.php @@ -108,7 +108,7 @@ public function convert(string $html): string return $this->sanitize($markdown); } - private function createDOMDocument(string $html): \DOMDocument + protected function createDOMDocument(string $html): \DOMDocument { $document = new \DOMDocument(); @@ -136,7 +136,7 @@ private function createDOMDocument(string $html): \DOMDocument * @see https://github.com/thephpleague/html-to-markdown/issues/212 * @see https://3v4l.org/7bC33 */ - private function replaceMisplacedComments(\DOMDocument $document): void + protected function replaceMisplacedComments(\DOMDocument $document): void { // Find ny comment nodes at the root of the document. $misplacedComments = (new \DOMXPath($document))->query('/comment()'); @@ -168,7 +168,7 @@ private function replaceMisplacedComments(\DOMDocument $document): void * Finds children of each node and convert those to #text nodes containing their Markdown equivalent, * starting with the innermost element and working up to the outermost element. */ - private function convertChildren(ElementInterface $element): void + protected function convertChildren(ElementInterface $element): void { // Don't convert HTML code inside and
 blocks to Markdown - that should stay as HTML
         // except if the current node is a code tag, which needs to be converted by the CodeConverter.