Insert spaces before comment text
authorCyperghost <olaf_schmitz_1@t-online.de>
Wed, 17 Jan 2024 14:42:33 +0000 (15:42 +0100)
committerOlaf Braun <info@braun-development.de>
Thu, 7 Mar 2024 15:36:44 +0000 (16:36 +0100)
wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeProcessor.class.php
wcfsetup/install/files/lib/system/html/node/HtmlNodePlainLink.class.php

index 9203b6d2350c383b789918e917abf961bafa27ae..249303cb4d94cfd527db560119b2a417f648b3da 100644 (file)
@@ -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.
-                    //<p><a href="https://example.com">https://example.com</a><br>…</p>
-                    //<p>…<br><a href="https://example.com">https://example.com</a></p>
+                    // Check whether the link is at the beginning or end of the paragraph
+                    // and whether the next or previous sibling is a line break.
+                    // <p><a href="https://example.com">https://example.com</a><br>…</p>
+                    // <p>…<br><a href="https://example.com">https://example.com</a></p>
                     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.
-                    //<p>…<br><a href="https://example.com">https://example.com</a><br>…</p>
-                    //<p>…<br><u><b><a href="https://example.com">https://example.com</a></b></u><br>…</p>
+                    // If not, the previous and next sibling may be a line break.
+                    // <p>…<br><a href="https://example.com">https://example.com</a><br>…</p>
+                    // <p>…<br><u><b><a href="https://example.com">https://example.com</a></b></u><br>…</p>
                     if (
                         $previousSibling === null && $nextSibling === null
                         || (
index 2de10c3eff7a0ab6172657f5e9b22855e32c9335..f27cc788ff000f6c6e8c0656fe12434378a4f451 100644 (file)
@@ -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 <br> from start and end of the new block elements
+                // Remove <br> from start and end of the new block elements
                 if ($next !== null) {
                     DOMUtil::removeNode($next);
                 }