From bbc0c97329735e86a5b186e14072a45bdeb958fe Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 19 Dec 2013 00:00:00 -0800 Subject: [PATCH] Update docdown to fix doc bugs related to params that are properties of other params. [ci skip] --- doc/README.md | 28 ++++++++++++++-------------- vendor/benchmark.js/benchmark.js | 17 ++++++++++------- vendor/docdown/src/DocDown/Entry.php | 6 +++++- 3 files changed, 29 insertions(+), 22 deletions(-) diff --git a/doc/README.md b/doc/README.md index ca7ca5a8e..15c5da705 100644 --- a/doc/README.md +++ b/doc/README.md @@ -18,7 +18,7 @@ * `_.initial` * `_.intersection` * `_.last` -* `_.lastIndexOf` +* `_.lastIndexOf` * `_.object` -> `zipObject` * `_.pull` * `_.range` @@ -106,8 +106,8 @@ * `_.bindAll` * `_.bindKey` * `_.compose` -* `_.curry` -* `_.debounce` +* `_.curry` +* `_.debounce` * `_.defer` * `_.delay` * `_.memoize` @@ -184,7 +184,7 @@ * `_.random` * `_.result` * `_.runInContext` -* `_.template` +* `_.template` * `_.times` * `_.unescape` * `_.uniqueId` @@ -646,8 +646,8 @@ _.last(characters, { 'employer': 'na' }); -### `_.lastIndexOf(array, value, [fromIndex=array.length-1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5043 "View in source") [Ⓣ][1] +### `_.lastIndexOf(array, value)` +# [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5043 "View in source") [Ⓣ][1] Gets the index at which the last occurrence of `value` is found using strict equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the offset from the end of the collection. @@ -2415,8 +2415,8 @@ welcome('pebbles'); -### `_.curry(func, [arity=func.length])` -# [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5749 "View in source") [Ⓣ][1] +### `_.curry(func)` +# [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5749 "View in source") [Ⓣ][1] Creates a function which accepts one or more arguments of `func` that when invoked either executes `func` returning its result, if all `func` arguments have been provided, or returns a function that accepts one or more of the remaining `func` arguments, and so on. The arity of `func` can be specified if `func.length` is not sufficient. @@ -2450,8 +2450,8 @@ curried(1, 2, 3); -### `_.debounce(func, wait, [options], [options.maxWait])` -# [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5793 "View in source") [Ⓣ][1] +### `_.debounce(func, wait, [options])` +# [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5793 "View in source") [Ⓣ][1] Creates a function that will delay the execution of `func` until after `wait` milliseconds have elapsed since the last time it was invoked. Provide an options object to indicate that `func` should be invoked on the leading and/or trailing edge of the `wait` timeout. Subsequent calls to the debounced function will return the result of the last `func` call. @@ -4376,8 +4376,8 @@ Create a new `lodash` function using the given context object. -### `_.template(text, data, [options], [options.escape], [options.evaluate], [options.imports], [options.interpolate], [sourceURL], [variable])` -# [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6643 "View in source") [Ⓣ][1] +### `_.template(text, data, [options])` +# [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6643 "View in source") [Ⓣ][1] A micro-templating method that handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code. @@ -4395,8 +4395,8 @@ For more information on Chrome extension sandboxes see [Chrome's extensions 5. `[options.evaluate]` *(RegExp)*: The "evaluate" delimiter. 6. `[options.imports]` *(Object)*: An object to import into the template as local variables. 7. `[options.interpolate]` *(RegExp)*: The "interpolate" delimiter. -8. `[sourceURL]` *(string)*: The sourceURL of the template's compiled source. -9. `[variable]` *(string)*: The data object variable name. +8. `[options.sourceURL]` *(string)*: The sourceURL of the template's compiled source. +9. `[options.variable]` *(string)*: The data object variable name. #### Returns *(Function, string)*: Returns a compiled function when no `data` object is given, else it returns the interpolated text. diff --git a/vendor/benchmark.js/benchmark.js b/vendor/benchmark.js/benchmark.js index c76cf6629..7bafd480a 100644 --- a/vendor/benchmark.js/benchmark.js +++ b/vendor/benchmark.js/benchmark.js @@ -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; } } diff --git a/vendor/docdown/src/DocDown/Entry.php b/vendor/docdown/src/DocDown/Entry.php index 51facb64d..62d419e5d 100644 --- a/vendor/docdown/src/DocDown/Entry.php +++ b/vendor/docdown/src/DocDown/Entry.php @@ -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), ', ') .')';