don't skip digit-only page names
This commit is contained in:
parent
c376d39022
commit
b4221fb324
1 changed files with 2 additions and 2 deletions
4
mkht.php
4
mkht.php
|
@ -101,7 +101,7 @@ foreach($nodes_cache as $node) {
|
|||
continue;
|
||||
|
||||
preg_match('/(?<pagename>[-\w]+)(?:\.(?<lang>[a-z]{2}))?\.md/', $path_parts_src['basename'], $matches);
|
||||
if ($matches['pagename'] === strtoupper($matches['pagename'])) // Ignore uppercase-only filenames (like README.md)
|
||||
if ($matches['pagename'] === strtoupper($matches['pagename']) AND $matches['pagename'] !== strtolower($matches['pagename'])) // Skip uppercase-only filenames (like README.md), but not digit-only (like 404.md)
|
||||
continue;
|
||||
|
||||
$pages[] = $node;
|
||||
|
@ -280,7 +280,7 @@ foreach ($pages as $node) {
|
|||
|
||||
$relative_addr = str_replace(SITE . 'cache/', '', $base_filepath_src . '.html');
|
||||
|
||||
// As of RFC 3151: A URN Namespace for Public Identifiers
|
||||
// According to RFC 3151: A URN Namespace for Public Identifiers
|
||||
$public_id = 'urn:publicid:' . $config['id'] . str_replace('/', '%2F', $relative_addr);
|
||||
|
||||
preg_match('#\<body\>(?<content>.*)\</body\>#s', file_get_contents($base_filepath_target . '.html'), $match);
|
||||
|
|
Loading…
Reference in a new issue