Skip to content

Commit

Permalink
updated cebe/markdown to 1.0.0
Browse files Browse the repository at this point in the history
this commit breaks the apidoc extension. will adjust it afterwards.
  • Loading branch information
cebe committed Oct 10, 2014
1 parent 357fc73 commit 664fe08
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"lib-pcre": "*",
"yiisoft/yii2-composer": "*",
"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.inputmask": "3.1.*",
"bower-asset/punycode": "1.3.*",
Expand Down
3 changes: 1 addition & 2 deletions extensions/apidoc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ Yii Framework 2 apidoc extension Change Log
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
---------------------------
Expand Down
2 changes: 1 addition & 1 deletion extensions/apidoc/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"phpdocumentor/reflection-docblock": ">2.0.1",
"nikic/php-parser": "0.9.*",
"cebe/js-search": "*",
"cebe/markdown": "dev-master as 0.9.0",
"cebe/markdown": "~1.0.0",
"cebe/markdown-latex": "*"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion extensions/apidoc/helpers/ApiMarkdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ protected function renderCode($block)
if (isset($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 {
return parent::renderCode($block);
}
Expand Down
4 changes: 4 additions & 0 deletions extensions/apidoc/helpers/ApiMarkdownTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
*/
trait ApiMarkdownTrait
{
/**
* @marker [[
* TODO adjust implementation
*/
protected function parseApiLinks($text)
{
$context = $this->renderingContext;
Expand Down
2 changes: 1 addition & 1 deletion extensions/apidoc/helpers/IndexFileAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function analyze($text)
protected function renderHeadline($block)
{
if ($this->_chapter === 0) {
$this->title = $block['content'];
$this->title = $block['content']; // TODO adjust implementation
$this->introduction = '';
$this->_chapter++;
} else {
Expand Down
1 change: 1 addition & 0 deletions framework/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 #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: Updated cebe/markdown to 1.0.0 which includes breaking changes in its internal API (cebe)


2.0.0-rc September 27, 2014
Expand Down
3 changes: 3 additions & 0 deletions framework/UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
-------------------------
Expand Down
2 changes: 1 addition & 1 deletion framework/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"lib-pcre": "*",
"yiisoft/yii2-composer": "*",
"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.inputmask": "3.1.*",
"bower-asset/punycode": "1.3.*",
Expand Down

0 comments on commit 664fe08

Please sign in to comment.