Skip to content

Commit e303766

Browse files
committed
fix tests, add formaly optional csv parser params
1 parent 518bf35 commit e303766

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

_test/ConfigParserTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ public function test_simple()
8787
'nesting' => 0,
8888
'index' => 0,
8989
'classes' => ['struct-custom-foo', 'struct-custom-bar'],
90+
'actcol' => -1,
9091
];
9192

9293
$this->assertEquals($expected_config, $actual_config);

_test/InlineConfigParserTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public function test_simple()
5454
'nesting' => 0,
5555
'index' => 0,
5656
'classes' => [],
57+
'actcol' => -1,
5758
];
5859

5960
$this->assertEquals($expected_config, $actual_config);

meta/InlineConfigParser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ public function __construct($inline)
3535
// Extract components
3636
$parts = explode('?', $inline, 2);
3737
$n_parts = count($parts);
38-
$components = str_getcsv(trim($parts[0]), '.');
38+
$components = str_getcsv(trim($parts[0]), '.', '"', '\\');
3939

4040
// Extract parameters if given
4141
$filtering = false; // First initialisation of the variable
4242
if ($n_parts == 2) {
4343
$filtering = false; // Whether to filter result to current page
44-
$parameters = str_getcsv(trim($parts[1]), ' ');
44+
$parameters = str_getcsv(trim($parts[1]), ' ', '"', '\\');
4545
$n_parameters = count($parameters);
4646

4747
// Process parameters and add to config lines

0 commit comments

Comments
 (0)