From c3912f7b6c4a5c0d1d8930f1aad495cf6b54875c Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Wed, 17 Jan 2024 15:42:33 +0100 Subject: [PATCH] Insert spaces before comment text --- .../input/node/HtmlInputNodeProcessor.class.php | 14 +++++++------- .../system/html/node/HtmlNodePlainLink.class.php | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeProcessor.class.php b/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeProcessor.class.php index 9203b6d235..249303cb4d 100644 --- a/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeProcessor.class.php +++ b/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeProcessor.class.php @@ -810,10 +810,10 @@ class HtmlInputNodeProcessor extends AbstractHtmlNodeProcessor $nextSibling = $this->getNoneEmptyNode($link, 'nextSibling'); $previousSibling = $this->getNoneEmptyNode($link, 'previousSibling'); - //Check whether the link is at the beginning or end of the paragraph - //and whether the next or previous sibling is a line break. - //

https://example.com
…

- //

…
https://example.com

+ // Check whether the link is at the beginning or end of the paragraph + // and whether the next or previous sibling is a line break. + //

https://example.com
…

+ //

…
https://example.com

if ( ($nextSibling === null && $previousSibling !== null && $previousSibling->nodeName === 'br') || ($previousSibling === null && $nextSibling !== null && $nextSibling->nodeName === 'br') @@ -821,9 +821,9 @@ class HtmlInputNodeProcessor extends AbstractHtmlNodeProcessor $this->plainLinks[] = $plainLink->setIsStandalone($parent, false); continue; } - //If not, the previous and next sibling may be a line break. - //

…
https://example.com
…

- //

…
https://example.com
…

+ // If not, the previous and next sibling may be a line break. + //

…
https://example.com
…

+ //

…
https://example.com
…

if ( $previousSibling === null && $nextSibling === null || ( diff --git a/wcfsetup/install/files/lib/system/html/node/HtmlNodePlainLink.class.php b/wcfsetup/install/files/lib/system/html/node/HtmlNodePlainLink.class.php index 2de10c3eff..f27cc788ff 100644 --- a/wcfsetup/install/files/lib/system/html/node/HtmlNodePlainLink.class.php +++ b/wcfsetup/install/files/lib/system/html/node/HtmlNodePlainLink.class.php @@ -185,7 +185,7 @@ class HtmlNodePlainLink $parent = $this->link; $next = $this->findBr($this->link, 'nextSibling'); $previous = $this->findBr($this->link, 'previousSibling'); - //link inside other elements(u, i, b, …) + // Link inside other elements(u, i, b, …) while ($next === null && $previous === null && $parent !== $this->topLevelParent) { $parent = $parent->parentElement; $next = $this->findBr($parent, 'nextSibling'); @@ -207,7 +207,7 @@ class HtmlNodePlainLink } \assert($replaceNode instanceof \DOMElement); - //remove
from start and end of the new block elements + // Remove
from start and end of the new block elements if ($next !== null) { DOMUtil::removeNode($next); } -- 2.20.1