Skip to content

Commit

Permalink
Change private methods to protected
Browse files Browse the repository at this point in the history
  • Loading branch information
metalinspired committed Feb 8, 2024
1 parent 0542c8f commit 80218c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/HtmlConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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()');
Expand Down Expand Up @@ -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 <code> and <pre> 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.
Expand Down

0 comments on commit 80218c3

Please sign in to comment.