mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06: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:
17
vendor/benchmark.js/benchmark.js
vendored
17
vendor/benchmark.js/benchmark.js
vendored
@@ -30,12 +30,15 @@
|
||||
/** Used to assign each benchmark an incrimented id */
|
||||
var counter = 0;
|
||||
|
||||
/** Used to make every compiled test unique */
|
||||
var uidCounter = 0;
|
||||
/** Detect the popular CommonJS extension `module.exports` */
|
||||
var moduleExports = freeModule && freeModule.exports === freeExports && freeExports;
|
||||
|
||||
/** Used to detect primitive types */
|
||||
var rePrimitive = /^(?:boolean|number|string|undefined)$/;
|
||||
|
||||
/** Used to make every compiled test unique */
|
||||
var uidCounter = 0;
|
||||
|
||||
/** Used to assign default `context` object properties */
|
||||
var contextProps = [
|
||||
'Array', 'Date', 'Function', 'Math', 'Object', 'RegExp', 'String', '_',
|
||||
@@ -2846,18 +2849,18 @@
|
||||
var Benchmark = runInContext();
|
||||
|
||||
// check for `exports` after `define` in case a build optimizer adds an `exports` object
|
||||
if (freeExports && !freeExports.nodeType) {
|
||||
// in Node.js or RingoJS v0.8.0+
|
||||
if (freeModule) {
|
||||
if (freeExports && freeModule) {
|
||||
// in Node.js or RingoJS
|
||||
if (moduleExports) {
|
||||
(freeModule.exports = Benchmark).Benchmark = Benchmark;
|
||||
}
|
||||
// in Narwhal or RingoJS v0.7.0-
|
||||
// in Narwhal or Rhino -require
|
||||
else {
|
||||
freeExports.Benchmark = Benchmark;
|
||||
}
|
||||
}
|
||||
// in a browser or Rhino
|
||||
else {
|
||||
// in a browser or Rhino
|
||||
root.Benchmark = Benchmark;
|
||||
}
|
||||
}
|
||||
|
||||
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