page: prevent reparsing of placeholder blocks
[minimedit.git] / page.php
index 175c2eb30f71e51c3cbf1509425b1e2987221953..9c88e79adef63baae3a0c04efad458e186108077 100644 (file)
--- a/page.php
+++ b/page.php
@@ -53,7 +53,7 @@ function getoutput($blocks = [])
        }
 
        return preg_replace_callback(
-               '< \[\[ ([^] ]+) ([^]]*) \]\] >x',
+               '{ (?<! <!--BLOCK: ) \[\[ ([^] ]+) ([^]]*) \]\] }x',
                function ($sub) use ($blocks) {
                        list ($placeholder, $name, $params) = $sub;
                        if (isset($blocks[$name])) {