Skip to content

Commit

Permalink
improved package headline processing
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Nov 12, 2015
1 parent 598eb5f commit 65a9b07
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/goals/PackageGoal.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function getForum()

public function getLabel()
{
return $this->getItem('label') ?: ucfirst($this->name);
return $this->getItem('label') ?: $this->getHeadline() ?: Helper::id2camel($this->name);
}

public function getTitle()
Expand All @@ -93,7 +93,7 @@ public function getTitle()

public function getHeadline()
{
return $this->getItem('headline') ?: $this->getTitle();
return $this->getItem('headline');
}

public function getDescription()
Expand Down
4 changes: 2 additions & 2 deletions src/views/README.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?= $config->readme->renderH1($config->package->headline) ?>
<?php if ($config->package->headline !== $config->package->title) { ?>
<?= $config->readme->renderH1($config->package->headline ?: $config->package->title) ?>
<?php if ($config->package->headline) { ?>
<?= $config->readme->renderBold($config->package->title) ?>
<?php } ?>
<?= $config->readme->renderBadges() ?>
Expand Down

0 comments on commit 65a9b07

Please sign in to comment.