Browse Source

fix count paragraph search

Jesús 7 months ago
parent
commit
16703c9cea
Signed by: Jesús <heckyel@hyperbola.info> GPG Key ID: F6EE7BC59A315766
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      content/pages/buscar.php.md

+ 2
- 2
content/pages/buscar.php.md View File

@@ -32,7 +32,7 @@ $STOP_WORDS = ['a', 'un', 'una', 'unas', 'unos', 'uno', 'sobre', 'todo',
32 32
                'trabajas', 'trabaja', 'trabajamos', 'trabajais', 'trabajan', 'podria',
33 33
                'podrias', 'podriamos', 'podrian', 'podriais', 'yo', 'aquel'];
34 34
 
35
-$DESCRIPTION_LENGTH = 20;
35
+$DESCRIPTION_LENGTH = 25;
36 36
 $HALF_DESCRIPTION_LENGTH = floor($DESCRIPTION_LENGTH / 2);
37 37
 
38 38
 $web_content = json_decode(file_get_contents('tipuesearch_content.json'), true);
@@ -158,7 +158,7 @@ if (isset($_GET['q'])) {
158 158
             break;
159 159
         } else {
160 160
             echo '<div class="tipue_search_content_text">';
161
-            for ($i = 0; $i < $description_words_count - floor($description_words_count/2); $i++) {
161
+            for ($i = 0; $i < $DESCRIPTION_LENGTH; $i++) {
162 162
                 echo $description_words[$i] . ' ';
163 163
             }
164 164
             if ($description_words_count > $DESCRIPTION_LENGTH) {