From 1492751f98e73bda99a864e9f30e81a83228e659 Mon Sep 17 00:00:00 2001 From: Jaeger Date: Sun, 22 Mar 2020 17:19:57 +0800 Subject: [PATCH] feat: optimization getHtml() --- src/Dom/Query.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Dom/Query.php b/src/Dom/Query.php index 4283756..40026a0 100644 --- a/src/Dom/Query.php +++ b/src/Dom/Query.php @@ -35,11 +35,12 @@ class Query } /** - * @return mixed + * @param bool $rel + * @return String */ - public function getHtml() + public function getHtml($rel = true) { - return $this->html; + return $rel ? $this->document->htmlOuter() : $this->html; } /**