Commit fd8828cf by Carsten Brandt

resolved naming conflict in apidoc

parent d8ae74ee
...@@ -29,7 +29,7 @@ class ApiMarkdown extends GithubMarkdown ...@@ -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 ...@@ -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 ...@@ -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 ...@@ -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; ...@@ -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)) {
......
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