Skip to content

Commit 5f2b1ee

Browse files
committed
feature #4642 [CommonMark] Update configuration keys + allow extra keys for extensions (doekenorg)
This PR was merged into the 3.x branch. Discussion ---------- [CommonMark] Update configuration keys + allow extra keys for extensions This PR adds missing keys from the current version of CommonMark (2.7). It also fixes a bug where extra keys are removed. The original intent was to keep the extra keys, so extensions could be configured as well. Currently, these keys are removed, meaning extensions can not be configured. Original PR #3737. Commits ------- a8aadc3 Update configuration keys + allow extra keys for extensions
2 parents 9ff927a + a8aadc3 commit 5f2b1ee

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

extra/twig-extra-bundle/DependencyInjection/Configuration.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ public function getConfigTreeBuilder(): TreeBuilder
3939
}
4040

4141
/**
42-
* Full configuration from {@link https://commonmark.thephpleague.com/2.3/configuration}.
42+
* Full configuration from {@link https://commonmark.thephpleague.com/2.7/configuration}.
4343
*/
4444
private function addCommonMarkConfiguration(ArrayNodeDefinition $rootNode): void
4545
{
4646
$rootNode
4747
->children()
4848
->arrayNode('commonmark')
49-
->ignoreExtraKeys()
49+
->ignoreExtraKeys(false)
5050
->children()
5151
->arrayNode('renderer')
5252
->info('Array of options for rendering HTML.')
@@ -68,6 +68,10 @@ private function addCommonMarkConfiguration(ArrayNodeDefinition $rootNode): void
6868
->info('The maximum nesting level for blocks.')
6969
->defaultValue(\PHP_INT_MAX)
7070
->end()
71+
->integerNode('max_delimiters_per_line')
72+
->info('The maximum number of strong/emphasis delimiters per line.')
73+
->defaultValue(\PHP_INT_MAX)
74+
->end()
7175
->arrayNode('slug_normalizer')
7276
->info('Array of options for configuring how URL-safe slugs are created.')
7377
->children()

0 commit comments

Comments
 (0)