getMarkdownContent(); // if the `compatibility.article.title.oldversion` is enabled // that means the title should be auto-generated from book.xml // but not written on page.md. // this code will generate a title from book.xml if the start // of the page.md is not `# Title` formatting page title. if (PageMeta::compatibilityOldTitlePolicy()) { $length = strlen($pageMarkdownContent); for ($i=0; $i<$length; $i++) { if (empty(trim($pageMarkdownContent[$i]))) { continue; } else if ($pageMarkdownContent[$i] == '#' && $pageMarkdownContent[$i+1] != '#') { break; } echo "\n"; echo "