Browse Source

getSentenceText change to public

visuddhinanda 3 months ago
parent
commit
a0cc9060d0
1 changed files with 2 additions and 2 deletions
  1. 2 2
      api-v8/app/Services/SearchPaliDataService.php

+ 2 - 2
api-v8/app/Services/SearchPaliDataService.php

@@ -173,7 +173,7 @@ class SearchPaliDataService
      * @param int $para
      * @param int $para
      * @return array $sentence
      * @return array $sentence
      */
      */
-    private function getSentenceText($book, $para, $start, $end)
+    public function getSentenceText($book, $para, $start, $end)
     {
     {
         $words = WbwTemplate::where('book', $book)
         $words = WbwTemplate::where('book', $book)
             ->where('paragraph', $para)
             ->where('paragraph', $para)
@@ -200,7 +200,7 @@ class SearchPaliDataService
                 $markdown .= $word->word . ' ';
                 $markdown .= $word->word . ' ';
             }
             }
         }
         }
-        $markdown = str_replace([' ti', ' ,', ' .', ' ?'], ['ti', ',', '.', '?'], $markdown);
+        $markdown = str_replace([' ti', ' ,', ' .', ' ?', '‘ ‘ ', ' ’ ’'], ['ti', ',', '.', '?', '‘‘', '’’'], $markdown);
         $markdown = str_replace(['~~  ~~', '** **'], [' ', ' '], $markdown);
         $markdown = str_replace(['~~  ~~', '** **'], [' ', ' '], $markdown);
         $text = implode(' ', $arrText);
         $text = implode(' ', $arrText);
         $text = str_replace([' ti', ' ,', ' .', ' ?'], ['ti', ',', '.', '?'], $text);
         $text = str_replace([' ti', ' ,', ' .', ' ?'], ['ti', ',', '.', '?'], $text);