Explorar el Código

introduce HtmlHelper::wrapNewlines

alexlcdee hace 8 años
padre
commit
f2418869ab
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/helpers/HtmlHelper.php

+ 1 - 1
src/helpers/HtmlHelper.php

@@ -25,7 +25,7 @@ class HtmlHelper
      */
     public static function wrapNewlines($content, $tag = 'p', $htmlOptions = [])
     {
-        $filteredNewLinesContent = preg_replace('((\r?\n)(?:\r?\n))', '$2', $content);
+        $filteredNewLinesContent = preg_replace('/((\r?\n)(?:\r?\n))/', '$2', $content);
         $lines = preg_split('/\r?\n/', $filteredNewLinesContent);
 
         return implode("\n", array_map(function ($line) use ($tag, $htmlOptions) {