null, 'pre' => null, 'br' => null, 'h1' => null, 'h2' => null, 'h3' => null, 'h4' => null, 'h5' => null, 'h6' => null, 'ul' => null, 'ol' => null, 'li' => null, 'table' => null, 'thead' => null, 'tbody' => null, 'tr' => null, 'th' => null, 'td' => null, 'hr' => null, 'div' => ['style'], ]; Markdown_Extensions::register($md); foreach (glob(__DIR__ . '/../doc/admin/*.md') as $file) { if (basename($file) == 'markdown_quickref.md') { $md->allowed_inline_tags = array_merge($md->allowed_inline_tags, $extra_tags); } else { $md->allowed_inline_tags = $md::DEFAULT_INLINE_TAGS; } $t = file_get_contents($file); if (preg_match('/^Title: (.*)/', $t, $match)) { $t = substr($t, strlen($match[0])); } $t = $md->text($t); $t = preg_replace('!(]+external[^>]+)>!', '$1 target="_blank">', $t); $title = $match[1] ?? $file; $out = ' ' . htmlspecialchars($title) . '
' . $t . '
'; $dest = __DIR__ . '/../src/www/admin/static/doc/' . str_replace('.md', '.html', basename($file)); file_put_contents($dest, $out); }