vrana Wed Aug 4 08:31:08 2004 EDT
Modified files: /phpdoc/scripts xml-check.php Log: Appendix is directly under Book http://cvs.php.net/diff.php/phpdoc/scripts/xml-check.php?r1=1.1&r2=1.2&ty=u Index: phpdoc/scripts/xml-check.php diff -u phpdoc/scripts/xml-check.php:1.1 phpdoc/scripts/xml-check.php:1.2 --- phpdoc/scripts/xml-check.php:1.1 Mon Aug 2 07:25:09 2004 +++ phpdoc/scripts/xml-check.php Wed Aug 4 08:31:08 2004 @@ -36,7 +36,7 @@ $header = preg_replace('~.*(<!DOCTYPE.*)<book.*~s', '\\1', file_get_contents("$root/manual.xml.in")); $header = str_replace(array('@srcdir@', '@LANGDIR@', "\n"), array('.', $language, ''), $header); // \n to preserve line numbers -$file = preg_replace('~(<?xml[^>]*>)(.*)~s', "\\1$header<book>" . (!preg_match("~<chapter|<reference~", $file) ? "<chapter id='example'><title>Example</title>\\2\n</chapter>" : "\\2") . "\n</book>\n", $file); +$file = preg_replace('~(<?xml[^>]*>)(.*)~s', "\\1$header<book>" . (!preg_match("~<chapter|<reference|<appendix~", $file) ? "<chapter id='example'><title>Example</title>\\2\n</chapter>" : "\\2") . "\n</book>\n", $file); $fp = fopen($example_filename, "wb"); fwrite($fp, $file); fclose($fp);