cvs: smarty /docs/scripts html_syntax.php
"Messju Mohr" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <cvsmessju1080668376@cvsserver> |
messju Tue Mar 30 12:39:36 2004 EDT
Modified files:
/smarty/docs/scripts html_syntax.php
Log:
fixed call to undefined function when highlighting php-code
http://cvs.php.net/diff.php/smarty/docs/scripts/html_syntax.php?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/scripts/html_syntax.php
diff -u smarty/docs/scripts/html_syntax.php:1.1 smarty/docs/scripts/html_syntax.php:1.2
--- smarty/docs/scripts/html_syntax.php:1.1 Wed Mar 24 10:54:31 2004
+++ smarty/docs/scripts/html_syntax.php Tue Mar 30 12:39:36 2004
@@ -19,13 +19,13 @@
| Highlight PHP examples |
+----------------------------------------------------------------------+
- $Id: html_syntax.php,v 1.1 2004/03/24 15:54:31 nlopess Exp $
+ $Id: html_syntax.php,v 1.2 2004/03/30 17:39:36 messju Exp $
*/
if ($_SERVER["argc"] < 3) {
exit("Purpose: Syntax highlight PHP examples in DSSSL generated HTML manual.\n"
.'Usage: html_syntax.php [ "html" | "php" ] [ filename.ext | dir | wildcard ] ...' ."\n"
- .'"html" - highlight_string() is applied, "php" - highlight_php() is added' ."\n"
+ .'"html" - highlight_string() is applied, "php" - highlight_string() is added' ."\n"
);
}
set_time_limit(5*60); // can run long, but not more than 5 minutes
@@ -37,7 +37,7 @@
function callback_highlight_php($matches) {
$with_tags = preg_replace_callback("!&#([0-9]+);!", "callback_html_number_entities_decode", $matches[1]);
if ($GLOBALS["TYPE"] == "php") {
- return "\n<?php\nhighlight_php('". addcslashes($with_tags, "'\\") ."');\n?>\n";
+ return "\n<?php\nhighlight_string('". addcslashes($with_tags, "'\\") ."');\n?>\n";
} else { // "html"
return highlight_string($with_tags, true);
}
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php