mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Update DocDown and Underscore.
Former-commit-id: 7744ef274a9d8b47975dc9f3e3283bd778bc5403
This commit is contained in:
19
vendor/docdown/src/DocDown/Entry.php
vendored
19
vendor/docdown/src/DocDown/Entry.php
vendored
@@ -152,6 +152,25 @@ class Entry {
|
||||
return $this->_call;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the entry's `category` data.
|
||||
*
|
||||
* @memberOf Entry
|
||||
* @returns {String} The entry's `category` data.
|
||||
*/
|
||||
public function getCategory() {
|
||||
if (isset($this->_category)) {
|
||||
return $this->_category;
|
||||
}
|
||||
|
||||
preg_match('#\* *@category\s+([^\n]+)#', $this->entry, $result);
|
||||
if (count($result)) {
|
||||
$result = trim(preg_replace('/(?:^|\n)\s*\* ?/', ' ', $result[1]));
|
||||
}
|
||||
$this->_category = $result;
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the entry's description.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user