little problems with the list generator
authorEduardo <[email protected]>
Sat, 25 Nov 2023 14:18:42 +0000 (15:18 +0100)
committerEduardo <[email protected]>
Sat, 25 Nov 2023 14:18:42 +0000 (15:18 +0100)
page-generator/generator.php

index 04d3675798d291e8c180c148257bcedef4fe17be..7c0634bfdc84c7c419ae24bc9d2907817f8dcf8b 100644 (file)
@@ -334,7 +334,7 @@ class CodeGenerator
         else
             $this->is_li_same_line = true;
 
-        if (isset($this->was_li_same_line) && !$this->was_li_same_line)
+        if (!isset($this->was_li_same_line) || !$this->was_li_same_line)
             $html = "<li";
         else
             $html = "";
@@ -346,7 +346,7 @@ class CodeGenerator
 
         // if has title and url = a with title
         if (!empty($url)) {
-            if (!$this->was_li_same_line)
+            if (!isset($this->was_li_same_line) || !$this->was_li_same_line)
                 $html .= '>';
             $html .= $this->a($url, $text, $title, $filtered_classes);
 
@@ -357,7 +357,7 @@ class CodeGenerator
         elseif (!empty($title)) {
             $html .= " title='$title'>$text";
         } else {
-            if (isset($this->was_li_same_line) && !$this->was_li_same_line)
+            if (!isset($this->was_li_same_line) || !$this->was_li_same_line)
                 $html .= '>';
             $html .= "$text";
         }