Skip to content

Commit 455516c

Browse files
committed
Merge pull request #126 from helios-ag/new_line
added max new lines option, fixes #125
2 parents 7208401 + 21c8b12 commit 455516c

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

Decoda/DecodaManager.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@ private function set($filterSet, Decoda $decoda = null)
443443
$decoda->setStrict($options['strict']);
444444
$decoda->setEscaping($options['escaping']);
445445
$decoda->setConfig(array('lineBreaks' => $options['line_breaks']));
446+
$decoda->setMaxNewlines($options['max_newlines']);
446447

447448
foreach ($options['filters'] as $id) {
448449
$decoda->addFilter($this->getFilter($id), $id);

DependencyInjection/Configuration.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,11 @@ public function getConfigTreeBuilder()
7777
->prototype('array')
7878
->children()
7979
->scalarNode('locale')->defaultValue('default')->end()
80-
->booleanNode('xhtml')->defaultValue(true)->end()
81-
->booleanNode('strict')->defaultValue(true)->end()
82-
->booleanNode('escaping')->defaultValue(true)->end()
83-
->booleanNode('line_breaks')->defaultValue(true)->end()
80+
->booleanNode('xhtml')->defaultTrue()->end()
81+
->booleanNode('strict')->defaultTrue()->end()
82+
->booleanNode('escaping')->defaultTrue()->end()
83+
->booleanNode('line_breaks')->defaultTrue()->end()
84+
->integerNode('max_newlines')->defaultValue(3)->end()
8485
->arrayNode('filters')
8586
->useAttributeAsKey('name')
8687
->prototype('variable')->end()

0 commit comments

Comments
 (0)