mirror of
https://github.com/php/web-pres2.git
synced 2026-03-23 23:12:07 +01:00
Javascript syntax highlighting and fix some old links
This commit is contained in:
12
objects.php
12
objects.php
@@ -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/ /\ \;\ /g'`;
|
||||
echo "</pre>";
|
||||
} else {
|
||||
$this->_highlight_none($_html_filename);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
echo "<pre>".htmlspecialchars($this->text)."</pre>\n";
|
||||
|
||||
Reference in New Issue
Block a user