Javascript syntax highlighting and fix some old links

This commit is contained in:
Rasmus Lerdorf
2007-10-16 18:14:35 +00:00
parent 3f29385d80
commit 89ab61a2bb

View File

@@ -391,7 +391,6 @@ function strip_markups($str) {
print `echo "{$text}" | c2html -cs`;
break;
case 'xml':
$prog = trim(`which code2html`);
if (!empty($prog)) {
$text = str_replace('"', '\\"', $this->text);
@@ -402,6 +401,17 @@ function strip_markups($str) {
echo "<pre>".htmlspecialchars($this->text)."</pre>\n";
}
break;
case 'javascript':
$prog = trim(`which code2html`);
if (!empty($prog)) {
$text = str_replace('"', '\\"', $this->text);
echo "<pre>\n";
print `echo "{$text}" | $prog -ljavascript -ohtml-light --no-header | sed -e 's/ /\&nbsp\;\&nbsp; /g'`;
echo "</pre>";
} else {
$this->_highlight_none($_html_filename);
}
break;
default:
echo "<pre>".htmlspecialchars($this->text)."</pre>\n";