Skip to content

Commit

Permalink
Merge commit '6b43771e08463a83ba7b2680e54dbf0de2e2ae59'
Browse files Browse the repository at this point in the history
Conflicts:
	templates/online/views/index.php
  • Loading branch information
bisubus committed Jan 11, 2015
2 parents ed5c074 + 6b43771 commit f2d7d72
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Yii Framework 2 apidoc extension Change Log
===========================================

2.0.2 under development
-----------------------
2.0.2 January 11, 2015
----------------------

- no changes in this release.

Expand Down
6 changes: 2 additions & 4 deletions helpers/ApiIndexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use cebe\jssearch\Indexer;
use cebe\jssearch\tokenizer\StandardTokenizer;
use cebe\jssearch\TokenizerInterface;
use yii\helpers\StringHelper;

/**
* ApiIndexer indexes framework API
Expand Down Expand Up @@ -37,10 +38,7 @@ protected function generateFileInfo($file, $contents, $basePath, $baseUrl)
if (preg_match('~<div id="classDescription">\s*<strong>(.*?)</strong>~s', $contents, $matches)) {
$description = strip_tags($matches[1]);
} elseif (preg_match('~<p>(.*?)</p>~s', $contents, $matches)) {
$description = strip_tags($matches[1]);
if (mb_strlen($description) > 1000) { // TODO truncate by words
$description = mb_substr($description, 0, 1000) . '...';
}
$description = StringHelper::truncate(strip_tags($matches[1]), 1000, '...', 'UTF-8');
} else {
$description = '';
}
Expand Down
3 changes: 1 addition & 2 deletions templates/bootstrap/assets/JsSearchAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

namespace yii\apidocchm\templates\bootstrap\assets;

use yii\web\AssetBundle;
use yii\web\View;

/**
Expand All @@ -16,7 +15,7 @@
* @author Carsten Brandt <mail@cebe.cc>
* @since 2.0
*/
class JsSearchAsset extends AssetBundle
class JsSearchAsset extends \yii\web\AssetBundle
{
public $sourcePath = '@vendor/cebe/js-search';
public $js = [
Expand Down
2 changes: 1 addition & 1 deletion templates/online/views/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
foreach ($types as $i => $class):
?>
<tr>
<td><?= $this->context->typeLink($class, $class->name) ?></td>
<td><?= $this->context->createTypeLink($class, $class, $class->name) ?></td>
<td><?= \yii\apidocchm\helpers\ApiMarkdown::process($class->shortDescription, $class, true) ?></td>
</tr>
<?php endforeach; ?>
Expand Down

0 comments on commit f2d7d72

Please sign in to comment.