article: ignore placeholders before teaser paragraph
authorMischa POSLAWSKY <perl@shiar.org>
Sun, 17 May 2020 03:39:59 +0000 (05:39 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Sun, 7 Jun 2020 05:44:46 +0000 (07:44 +0200)
article.inc.php

index dbc545f8df2fadf209f00f76d74190eeb288f505..2f5b8739deb3f6c2a2446395156749b7b6284e14 100644 (file)
@@ -132,7 +132,7 @@ class ArchiveArticle
                $offset = strpos($this->raw, '</h2>');
                $offset = $offset ? $offset + 5 : 0;
                if (preg_match('{
-                       \G (?: \s+ | <p\sclass="nav\b.*?</p> | <div [^>]*> )* <p> \s* (.*?) </p>
+                       \G (?> \s+ | <p\sclass="nav\b.*?</p> | <div [^>]*> | \[\[[^]]*\]\] )* <p> \s* (.*?) </p>
                }sx', $this->raw, $bodyp, 0, $offset)) {
                        return $bodyp[1];
                }