X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/ed38c6a76767a893a319f7bfd9229b0dad6b08db..c2b82132e3ee9e658299f15d0c07e4af70dae498:/article.inc.php diff --git a/article.inc.php b/article.inc.php index d8ddf77..dd3d5b2 100644 --- a/article.inc.php +++ b/article.inc.php @@ -22,7 +22,7 @@ class ArchiveArticle 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); } @@ -110,7 +110,7 @@ class ArchiveArticle function story() { if ( preg_match('{ - \n (?: < (?: p | figure [^>]* ) >\s* )+ (]*>) | \n + (?: < (?: p | figure [^>]* ) >\s* )+ (]*>) | \n }x', $this->body, $img, PREG_OFFSET_CAPTURE) ) { # strip part after matching divider (image) if (isset($img[1])) { @@ -132,7 +132,7 @@ class ArchiveArticle (?: \s+ | | ]*> )*

\s* (.*?)

}sx', $this->raw, $bodyp, PREG_OFFSET_CAPTURE)) { # fallback paragraph contents following the page header - if ($bodyp[1][1] < 256) { + if ($bodyp[1][1] < 512) { return $bodyp[1][0]; } }