Commit 664fe088 by Carsten Brandt

updated cebe/markdown to 1.0.0

this commit breaks the apidoc extension. will adjust it afterwards.
parent 357fc73c
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
"lib-pcre": "*", "lib-pcre": "*",
"yiisoft/yii2-composer": "*", "yiisoft/yii2-composer": "*",
"ezyang/htmlpurifier": "4.6.*", "ezyang/htmlpurifier": "4.6.*",
"cebe/markdown": "0.9.*", "cebe/markdown": "~1.0.0",
"bower-asset/jquery": "2.1.*@stable | 1.11.*@stable", "bower-asset/jquery": "2.1.*@stable | 1.11.*@stable",
"bower-asset/jquery.inputmask": "3.1.*", "bower-asset/jquery.inputmask": "3.1.*",
"bower-asset/punycode": "1.3.*", "bower-asset/punycode": "1.3.*",
......
...@@ -4,8 +4,7 @@ Yii Framework 2 apidoc extension Change Log ...@@ -4,8 +4,7 @@ Yii Framework 2 apidoc extension Change Log
2.0.0 under development 2.0.0 under development
----------------------- -----------------------
- no changes in this release. - Chg: Updated cebe/markdown to 1.0.0 which includes breaking changes in its internal API (cebe)
2.0.0-rc September 27, 2014 2.0.0-rc September 27, 2014
--------------------------- ---------------------------
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
"phpdocumentor/reflection-docblock": ">2.0.1", "phpdocumentor/reflection-docblock": ">2.0.1",
"nikic/php-parser": "0.9.*", "nikic/php-parser": "0.9.*",
"cebe/js-search": "*", "cebe/js-search": "*",
"cebe/markdown": "dev-master as 0.9.0", "cebe/markdown": "~1.0.0",
"cebe/markdown-latex": "*" "cebe/markdown-latex": "*"
}, },
"autoload": { "autoload": {
......
...@@ -40,7 +40,7 @@ class ApiMarkdown extends GithubMarkdown ...@@ -40,7 +40,7 @@ class ApiMarkdown extends GithubMarkdown
if (isset($block['language'])) { if (isset($block['language'])) {
$class = isset($block['language']) ? ' class="language-' . $block['language'] . '"' : ''; $class = isset($block['language']) ? ' class="language-' . $block['language'] . '"' : '';
return "<pre><code$class>" . $this->highlight(implode("\n", $block['content']) . "\n", $block['language']) . '</code></pre>'; return "<pre><code$class>" . $this->highlight($block['content'] . "\n", $block['language']) . '</code></pre>';
} else { } else {
return parent::renderCode($block); return parent::renderCode($block);
} }
......
...@@ -18,6 +18,10 @@ use yii\apidoc\models\TypeDoc; ...@@ -18,6 +18,10 @@ use yii\apidoc\models\TypeDoc;
*/ */
trait ApiMarkdownTrait trait ApiMarkdownTrait
{ {
/**
* @marker [[
* TODO adjust implementation
*/
protected function parseApiLinks($text) protected function parseApiLinks($text)
{ {
$context = $this->renderingContext; $context = $this->renderingContext;
......
...@@ -28,7 +28,7 @@ class IndexFileAnalyzer extends Markdown ...@@ -28,7 +28,7 @@ class IndexFileAnalyzer extends Markdown
protected function renderHeadline($block) protected function renderHeadline($block)
{ {
if ($this->_chapter === 0) { if ($this->_chapter === 0) {
$this->title = $block['content']; $this->title = $block['content']; // TODO adjust implementation
$this->introduction = ''; $this->introduction = '';
$this->_chapter++; $this->_chapter++;
} else { } else {
......
...@@ -21,6 +21,7 @@ Yii Framework 2 Change Log ...@@ -21,6 +21,7 @@ Yii Framework 2 Change Log
- Enh #5316: Added `startsWith()` and `endsWith()` to `yii\helpers\StringHelper`. Methods are binary-safe, multibyte-safe and optionally case-insensitive (armab) - Enh #5316: Added `startsWith()` and `endsWith()` to `yii\helpers\StringHelper`. Methods are binary-safe, multibyte-safe and optionally case-insensitive (armab)
- Enh #5467: Added ability to pass HTML tag options to `asEmail()`, `asImage()` and `asUrl()` methods of `yii\i18n\Formatter` (alxkolm, samdark) - Enh #5467: Added ability to pass HTML tag options to `asEmail()`, `asImage()` and `asUrl()` methods of `yii\i18n\Formatter` (alxkolm, samdark)
- Chg #2037: Dropped the support for using `yii\base\Module` as concrete module classes (qiangxue) - Chg #2037: Dropped the support for using `yii\base\Module` as concrete module classes (qiangxue)
- Chg: Updated cebe/markdown to 1.0.0 which includes breaking changes in its internal API (cebe)
2.0.0-rc September 27, 2014 2.0.0-rc September 27, 2014
......
...@@ -28,6 +28,9 @@ Upgrade from Yii 2.0 RC ...@@ -28,6 +28,9 @@ Upgrade from Yii 2.0 RC
* If you've used `asImage` formatter i.e. `Yii::$app->formatter->asImage($value, $alt);` you should change it * If you've used `asImage` formatter i.e. `Yii::$app->formatter->asImage($value, $alt);` you should change it
to `Yii::$app->formatter->asImage($value, ['alt' => $alt]);`. to `Yii::$app->formatter->asImage($value, ['alt' => $alt]);`.
* Yii now requires `cebe/markdown` 1.0.0 or higher, which includes breaking changes in its internal API. If you extend the markdown class
you need to update your implementation. See <https://github.com/cebe/markdown/releases/tag/1.0.0-rc> for details.
If you just used the markdown helper class there is no need to change anything.
Upgrade from Yii 2.0 Beta Upgrade from Yii 2.0 Beta
------------------------- -------------------------
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
"lib-pcre": "*", "lib-pcre": "*",
"yiisoft/yii2-composer": "*", "yiisoft/yii2-composer": "*",
"ezyang/htmlpurifier": "4.6.*", "ezyang/htmlpurifier": "4.6.*",
"cebe/markdown": "0.9.*", "cebe/markdown": "~1.0.0",
"bower-asset/jquery": "2.1.*@stable | 1.11.*@stable", "bower-asset/jquery": "2.1.*@stable | 1.11.*@stable",
"bower-asset/jquery.inputmask": "3.1.*", "bower-asset/jquery.inputmask": "3.1.*",
"bower-asset/punycode": "1.3.*", "bower-asset/punycode": "1.3.*",
......
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