diff options
Diffstat (limited to 'src/View.php')
| -rw-r--r-- | src/View.php | 14 | 
1 files changed, 13 insertions, 1 deletions
diff --git a/src/View.php b/src/View.php index 1c29a67..10ce9db 100644 --- a/src/View.php +++ b/src/View.php @@ -40,6 +40,18 @@ class View     */    public static function render(string $name, array $context = []): string    { -    return self::$twig->render($name, $context); +    if (isset($_ENV['GEMINI'])) { +      $string = self::$twig->render($name, $context); +      $lines = explode(PHP_EOL, $string); +      $output = ''; + +      foreach ($lines as $line) { +        $output .= ltrim($line, ' \t') . "\r\n"; +      } + +      return $output; +    } else { +      return self::$twig->render($name, $context); +    }    }  }  | 
