Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change private methods to protected #247

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading