Skip to content

Commit

Permalink
Merge branch 'hotfix/blog-url'
Browse files Browse the repository at this point in the history
  • Loading branch information
weierophinney committed Mar 6, 2015
2 parents b33cf3d + b79906f commit 9adece6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Blog/EngineMiddleware.php
Expand Up @@ -35,7 +35,7 @@ public function __invoke($req, $res, $next)
return $this->listPosts($req, $res, $next, $tag);
}

if (preg_match('#^/(?P<id>[^/]+)\.html$#', $path, $matches)) {
if (preg_match('#^/+(?P<id>[^/]+)\.html$#', $path, $matches)) {
return $this->displayPost($matches['id'], $req, $res, $next);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Blog/EntryView.php
Expand Up @@ -19,7 +19,7 @@ class EntryView

public function __construct(array $entry, $basePath, array $disqus)
{
$this->basePath = $basePath;
$this->basePath = rtrim($basePath, '/');
$this->disqus = $disqus;

foreach ($entry as $key => $value) {
Expand Down

0 comments on commit 9adece6

Please sign in to comment.