mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Update docdown to fix doc bugs related to params that are properties of other params. [ci skip]
This commit is contained in:
6
vendor/docdown/src/DocDown/Entry.php
vendored
6
vendor/docdown/src/DocDown/Entry.php
vendored
@@ -141,12 +141,16 @@ class Entry {
|
||||
// compose parts
|
||||
$result = array($result);
|
||||
$params = $this->getParams();
|
||||
$paramNames = array();
|
||||
|
||||
foreach ($params as $param) {
|
||||
// skip params that are properties of other params (e.g. `options.leading`)
|
||||
if (!preg_match('/\w+\.[\w.]+\s*=/', $param[1])) {
|
||||
preg_match('/\w+(?=\.[\w.]+)/', $param[1], $parentParam);
|
||||
$parentParam = $parentParam[0];
|
||||
if (!in_array($parentParam, $paramNames)) {
|
||||
$result[] = $param[1];
|
||||
}
|
||||
$paramNames[] = preg_replace('/^\[|\]$/', '', $param[1]);
|
||||
}
|
||||
// format
|
||||
$result = $name .'('. implode(array_slice($result, 1), ', ') .')';
|
||||
|
||||
Reference in New Issue
Block a user