mirror of
https://github.com/cosmocode/dokuwiki-plugin-struct.git
synced 2025-07-23 00:46:57 +00:00
fix tests, add formaly optional csv parser params
This commit is contained in:
@ -87,6 +87,7 @@ class ConfigParserTest extends StructTest
|
||||
'nesting' => 0,
|
||||
'index' => 0,
|
||||
'classes' => ['struct-custom-foo', 'struct-custom-bar'],
|
||||
'actcol' => -1,
|
||||
];
|
||||
|
||||
$this->assertEquals($expected_config, $actual_config);
|
||||
|
@ -54,6 +54,7 @@ class InlineConfigParserTest extends StructTest
|
||||
'nesting' => 0,
|
||||
'index' => 0,
|
||||
'classes' => [],
|
||||
'actcol' => -1,
|
||||
];
|
||||
|
||||
$this->assertEquals($expected_config, $actual_config);
|
||||
|
@ -35,13 +35,13 @@ class InlineConfigParser extends ConfigParser
|
||||
// Extract components
|
||||
$parts = explode('?', $inline, 2);
|
||||
$n_parts = count($parts);
|
||||
$components = str_getcsv(trim($parts[0]), '.');
|
||||
$components = str_getcsv(trim($parts[0]), '.', '"', '\\');
|
||||
|
||||
// Extract parameters if given
|
||||
$filtering = false; // First initialisation of the variable
|
||||
if ($n_parts == 2) {
|
||||
$filtering = false; // Whether to filter result to current page
|
||||
$parameters = str_getcsv(trim($parts[1]), ' ');
|
||||
$parameters = str_getcsv(trim($parts[1]), ' ', '"', '\\');
|
||||
$n_parameters = count($parameters);
|
||||
|
||||
// Process parameters and add to config lines
|
||||
|
Reference in New Issue
Block a user