]> _ Git - psq.git/commitdiff
Update PdfFile.php
authorLouis Jeckel <louis.jeckel@outlook.cm>
Fri, 11 Sep 2020 11:49:05 +0000 (13:49 +0200)
committerLouis Jeckel <louis.jeckel@outlook.cm>
Fri, 11 Sep 2020 11:49:05 +0000 (13:49 +0200)
app/PdfFile.php

index 2ed6489327ee1872b4eb43f120466409759de2b1..61f4fcf28722a433f086f6989d5de7f4f052cbe1 100644 (file)
@@ -471,14 +471,16 @@ class PdfFile extends TwillModel implements Sortable
                     continue;
 
                 $text = preg_replace('/^([A-Z]) /', '$1', $text);
+                $text = Str::lower(trim($text));
 
-                $newBuffer = $buffer . ' ' . Str::lower(trim($text));
+                $newBuffer = $buffer . ' ' . $text;
 
                 if(Str::length($newBuffer) > config('scout.text_max_length')) {
                     $result[] = [
                         'content' => $buffer,
                         'page' => $page_i,
                     ];
+                    $newBuffer = $text;
                 }
 
                 $buffer = $newBuffer;