Commit fd8828cf by Carsten Brandt

resolved naming conflict in apidoc

parent d8ae74ee
......@@ -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)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment