From 18e0df585ac0dc5c650bcfaa7b217c7b2e741d11 Mon Sep 17 00:00:00 2001 From: yggverse Date: Sun, 7 Jul 2024 02:39:15 +0300 Subject: [PATCH] implement preformatted multiline text --- src/Entity/Browser/Container/Tab/Page/Content/Data.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Entity/Browser/Container/Tab/Page/Content/Data.php b/src/Entity/Browser/Container/Tab/Page/Content/Data.php index 63d4e1f2..5aff2688 100644 --- a/src/Entity/Browser/Container/Tab/Page/Content/Data.php +++ b/src/Entity/Browser/Container/Tab/Page/Content/Data.php @@ -82,7 +82,8 @@ class Data public function setGemtext( string $value, - string | null &$title = null + string | null &$title = null, + bool $preformatted = false ): void { $document = new Document( @@ -109,7 +110,9 @@ class Data else { - // @TODO multiline + $line[] = $preformatted ? '' : ''; + + $preformatted = !($preformatted); // toggle } break;