mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-03 22:32:40 +08:00
Merge remote-tracking branch 'upstream/master' into upstream
* upstream/master: resolved naming conflict in apidoc
This commit is contained in:
@ -29,7 +29,7 @@ class ApiMarkdown extends GithubMarkdown
|
|||||||
*/
|
*/
|
||||||
public static $renderer;
|
public static $renderer;
|
||||||
|
|
||||||
protected $context;
|
protected $renderingContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renders a code block
|
* Renders a code block
|
||||||
@ -104,7 +104,7 @@ class ApiMarkdown extends GithubMarkdown
|
|||||||
if (is_string($context)) {
|
if (is_string($context)) {
|
||||||
$context = static::$renderer->apiContext->getType($context);
|
$context = static::$renderer->apiContext->getType($context);
|
||||||
}
|
}
|
||||||
Markdown::$flavors['api']->context = $context;
|
Markdown::$flavors['api']->renderingContext = $context;
|
||||||
|
|
||||||
if ($paragraph) {
|
if ($paragraph) {
|
||||||
return Markdown::processParagraph($content, 'api');
|
return Markdown::processParagraph($content, 'api');
|
||||||
|
|||||||
@ -27,7 +27,7 @@ class ApiMarkdownLaTeX extends GithubMarkdown
|
|||||||
*/
|
*/
|
||||||
public static $renderer;
|
public static $renderer;
|
||||||
|
|
||||||
protected $context;
|
protected $renderingContext;
|
||||||
|
|
||||||
protected function inlineMarkers()
|
protected function inlineMarkers()
|
||||||
{
|
{
|
||||||
@ -62,7 +62,7 @@ class ApiMarkdownLaTeX extends GithubMarkdown
|
|||||||
if (is_string($context)) {
|
if (is_string($context)) {
|
||||||
$context = static::$renderer->apiContext->getType($context);
|
$context = static::$renderer->apiContext->getType($context);
|
||||||
}
|
}
|
||||||
Markdown::$flavors['api-latex']->context = $context;
|
Markdown::$flavors['api-latex']->renderingContext = $context;
|
||||||
|
|
||||||
if ($paragraph) {
|
if ($paragraph) {
|
||||||
return Markdown::processParagraph($content, 'api-latex');
|
return Markdown::processParagraph($content, 'api-latex');
|
||||||
|
|||||||
@ -14,13 +14,13 @@ use yii\apidoc\models\TypeDoc;
|
|||||||
/**
|
/**
|
||||||
* Class ApiMarkdownTrait
|
* Class ApiMarkdownTrait
|
||||||
*
|
*
|
||||||
* @property TypeDoc $context
|
* @property TypeDoc $renderingContext
|
||||||
*/
|
*/
|
||||||
trait ApiMarkdownTrait
|
trait ApiMarkdownTrait
|
||||||
{
|
{
|
||||||
protected function parseApiLinks($text)
|
protected function parseApiLinks($text)
|
||||||
{
|
{
|
||||||
$context = $this->context;
|
$context = $this->renderingContext;
|
||||||
|
|
||||||
if (preg_match('/^\[\[([\w\d\\\\\(\):$]+)(\|[^\]]*)?\]\]/', $text, $matches)) {
|
if (preg_match('/^\[\[([\w\d\\\\\(\):$]+)(\|[^\]]*)?\]\]/', $text, $matches)) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user