Skip to content

Commit 8f2bf4e

Browse files
committed
Expose trim blocks
1 parent ad9d559 commit 8f2bf4e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Template.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class Template
2222
*
2323
* @param string $template The template string.
2424
*/
25-
public function __construct(string $template)
25+
public function __construct(string $template, bool $lstripBlocks = true, bool $trimBlocks = true)
2626
{
27-
$tokens = Lexer::tokenize($template, lstripBlocks: true, trimBlocks: true);
27+
$tokens = Lexer::tokenize($template, lstripBlocks: $lstripBlocks, trimBlocks: $trimBlocks);
2828
$this->parsed = Parser::make($tokens)->parse();
2929
}
3030

0 commit comments

Comments
 (0)