mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 15:06:33 +01:00
Clean up doc intro and syntax highlighting.
This commit is contained in:
parent
e8f177aa2d
commit
24ebd0360a
@ -118,7 +118,7 @@ a:hover { text-decoration: underline; }
|
||||
|
||||
<h1><a href="http://tinyclouds.org/node">Node</a></h1>
|
||||
|
||||
<p id="introduction">Purely asynchronous server-side I/O for <a
|
||||
<p id="introduction">Purely evented server-side I/O for <a
|
||||
href="http://code.google.com/p/v8/">V8 javascript</a>.
|
||||
|
||||
<p>This is an example of a web server written with Node which responds with
|
||||
@ -133,6 +133,12 @@ a:hover { text-decoration: underline; }
|
||||
}).listen(8000);
|
||||
puts("Server running at http://127.0.0.1:8000/");</pre>
|
||||
|
||||
<p> To run the server, put the code into a file <code>server.js</code>
|
||||
and call it with the <code>node</code> executable
|
||||
<pre class="sh_none">% /usr/local/bin/node server.js
|
||||
Server running at http://127.0.0.1:8000/
|
||||
</pre>
|
||||
|
||||
|
||||
<p> See <a href="#api">the API documentation</a> for more examples.
|
||||
|
||||
@ -152,10 +158,15 @@ puts("Server running at http://127.0.0.1:8000/");</pre>
|
||||
|
||||
<h2 id="build">Build</h2>
|
||||
|
||||
<p>Node currently targets the Linux and Macintosh operating systems using
|
||||
IA-32 or ARM processors. The build system requires Python.
|
||||
<p>Node aims to support all POSIX operating systems (including
|
||||
Windows with mingw). However at the moment it is only being tested on
|
||||
Macintosh and Linux.
|
||||
|
||||
<pre>./configure
|
||||
<p>V8, on which Node is built, supports only IA-32 and ARM processors.
|
||||
|
||||
<p> The build system requires Python.
|
||||
|
||||
<pre class="sh_none">./configure
|
||||
make
|
||||
make install</pre>
|
||||
|
||||
|
@ -516,9 +516,13 @@ function highlight(prefix, suffix, tag) {
|
||||
var element = nodeList.item(i);
|
||||
var htmlClasses = sh_getClasses(element);
|
||||
var highlighted = false;
|
||||
var donthighlight = false;
|
||||
for (var j = 0; j < htmlClasses.length; j++) {
|
||||
var htmlClass = htmlClasses[j].toLowerCase();
|
||||
if (htmlClass === 'sh_none') break;
|
||||
if (htmlClass === 'sh_none') {
|
||||
donthighlight = true
|
||||
continue;
|
||||
}
|
||||
if (htmlClass.substr(0, 3) === 'sh_') {
|
||||
var language = htmlClass.substring(3);
|
||||
if (language in sh_languages) {
|
||||
@ -534,7 +538,7 @@ function highlight(prefix, suffix, tag) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (highlighted === false) {
|
||||
if (highlighted === false && donthighlight == false) {
|
||||
sh_highlightElement(element, sh_languages["javascript"]);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user