mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-03 05:48:11 +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;
|
||||
|
||||
protected $context;
|
||||
protected $renderingContext;
|
||||
|
||||
/**
|
||||
* Renders a code block
|
||||
@ -104,7 +104,7 @@ class ApiMarkdown extends GithubMarkdown
|
||||
if (is_string($context)) {
|
||||
$context = static::$renderer->apiContext->getType($context);
|
||||
}
|
||||
Markdown::$flavors['api']->context = $context;
|
||||
Markdown::$flavors['api']->renderingContext = $context;
|
||||
|
||||
if ($paragraph) {
|
||||
return Markdown::processParagraph($content, 'api');
|
||||
|
||||
@ -27,7 +27,7 @@ class ApiMarkdownLaTeX extends GithubMarkdown
|
||||
*/
|
||||
public static $renderer;
|
||||
|
||||
protected $context;
|
||||
protected $renderingContext;
|
||||
|
||||
protected function inlineMarkers()
|
||||
{
|
||||
@ -62,7 +62,7 @@ class ApiMarkdownLaTeX extends GithubMarkdown
|
||||
if (is_string($context)) {
|
||||
$context = static::$renderer->apiContext->getType($context);
|
||||
}
|
||||
Markdown::$flavors['api-latex']->context = $context;
|
||||
Markdown::$flavors['api-latex']->renderingContext = $context;
|
||||
|
||||
if ($paragraph) {
|
||||
return Markdown::processParagraph($content, 'api-latex');
|
||||
|
||||
@ -14,13 +14,13 @@ use yii\apidoc\models\TypeDoc;
|
||||
/**
|
||||
* Class ApiMarkdownTrait
|
||||
*
|
||||
* @property TypeDoc $context
|
||||
* @property TypeDoc $renderingContext
|
||||
*/
|
||||
trait ApiMarkdownTrait
|
||||
{
|
||||
protected function parseApiLinks($text)
|
||||
{
|
||||
$context = $this->context;
|
||||
$context = $this->renderingContext;
|
||||
|
||||
if (preg_match('/^\[\[([\w\d\\\\\(\):$]+)(\|[^\]]*)?\]\]/', $text, $matches)) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user