From e59b136b64eddbe90c9f2cc0ddeb93f07d4c37a9 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Wed, 12 Nov 2025 12:30:43 +0400 Subject: [PATCH] modifs.mineures sans commentaires --- src/web/content/SimpleTag.php | 8 +++++--- src/web/content/Tag.php | 2 +- src/web/vo.php | 14 ++++++++++++++ tbin/test-vo.php | 12 ++++++++++++ 4 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 src/web/vo.php create mode 100644 tbin/test-vo.php diff --git a/src/web/content/SimpleTag.php b/src/web/content/SimpleTag.php index bcb73c5..56e01da 100644 --- a/src/web/content/SimpleTag.php +++ b/src/web/content/SimpleTag.php @@ -101,8 +101,10 @@ class SimpleTag implements IContent { $parts = ["<{$this->tag}"]; $this->addAttrs($parts, $attrs); $parts[] = ">"; - A::merge($parts, $children); - $parts[] = "tag}>"; - return [c::to_string($parts)]; + return [c::to_string([ + implode("", $parts), + ...$children, + "tag}>", + ])]; } } diff --git a/src/web/content/Tag.php b/src/web/content/Tag.php index 802e28d..dcf09fe 100644 --- a/src/web/content/Tag.php +++ b/src/web/content/Tag.php @@ -48,7 +48,7 @@ class Tag extends SimpleTag implements IPrintable { $parts = ["<{$this->tag}"]; $this->addAttrs($parts, $this->attrs); $parts[] = ">"; - return $parts; + return [implode("", $parts)]; } function getChildren(): array { diff --git a/src/web/vo.php b/src/web/vo.php new file mode 100644 index 0000000..7d41655 --- /dev/null +++ b/src/web/vo.php @@ -0,0 +1,14 @@ +