mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-09 19:19:29 +03:00
Merge branch '1.0.x'
This commit is contained in:
commit
dfcf41b0f8
@ -182,11 +182,12 @@ class ApiDocExtractor
|
|||||||
$docblock = $this->getDocComment($method);
|
$docblock = $this->getDocComment($method);
|
||||||
|
|
||||||
if (null === $annotation->getDescription()) {
|
if (null === $annotation->getDescription()) {
|
||||||
$comments = explode("\n @", $docblock);
|
$comments = explode("\n", $this->getDocCommentText($method));
|
||||||
// just set the first line
|
// just set the first line
|
||||||
$comment = trim($comments[0]);
|
$comment = trim($comments[0]);
|
||||||
$comment = preg_replace("#[\n]+#", ' ', $comment);
|
$comment = preg_replace("#\n+#", ' ', $comment);
|
||||||
$comment = preg_replace('#[ ]+#', ' ', $comment);
|
$comment = preg_replace('#\s+#', ' ', $comment);
|
||||||
|
$comment = preg_replace('#[_`*]+#', '', $comment);
|
||||||
|
|
||||||
if ('@' !== substr($comment, 0, 1)) {
|
if ('@' !== substr($comment, 0, 1)) {
|
||||||
$annotation->setDescription($comment);
|
$annotation->setDescription($comment);
|
||||||
|
@ -90,12 +90,24 @@ strong {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre {
|
em {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
code, pre {
|
||||||
font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
|
font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
|
||||||
background-color: #fcf6db;
|
background-color: #fcf6db;
|
||||||
|
}
|
||||||
|
|
||||||
|
p code {
|
||||||
|
padding: 1px 4px 1px 4px;
|
||||||
border: 1px solid #e5e0c6;
|
border: 1px solid #e5e0c6;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
/* white-space: pre-line */
|
border: 1px solid #e5e0c6;
|
||||||
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.fullwidth {
|
table.fullwidth {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user