Merge remote-tracking branch 'upstream/master' into upstream

* upstream/master:
  resolved naming conflict in apidoc
This commit is contained in:
Antonio Ramirez
2014-06-28 01:30:30 +02:00
3 changed files with 6 additions and 6 deletions

View File

@ -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');

View File

@ -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');

View File

@ -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)) {