X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/dcf14e6ed4093fd464367806e2211bb4bec3c8ba..8da4e3db153de18c026cc8dda79bdc0947663c8a:/article.inc.php?ds=inline diff --git a/article.inc.php b/article.inc.php index 503c5a1..6c3ca93 100644 --- a/article.inc.php +++ b/article.inc.php @@ -16,13 +16,13 @@ function showdate($parts) class ArchiveArticle { - public $raw, $preface, $title, $body; + public $raw, $title, $body; # file contents public $meta = []; function __construct($path) { $this->page = preg_replace('{^\.(?:/|$)}', '', $path); - $this->link = preg_replace('{(?:/index)?\.html$}', '', $this->page); + $this->link = preg_replace('{(?:(?:/|^)index)?\.html$}', '', $this->page); $this->raw($this->page); } @@ -41,8 +41,11 @@ class ArchiveArticle $this->meta = array_combine($meta[1], $meta[2]); # [property => content] } - @list ($this->preface, $this->title, $this->body) = - preg_split('{