From: Ryan Date: Tue, 26 May 2009 16:06:53 +0000 (+0200) Subject: Clean up doc intro and syntax highlighting. X-Git-Tag: v0.0.1~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=24ebd0360a2e9529600044bc46a574687595a1e3;p=platform%2Fupstream%2Fnodejs.git Clean up doc intro and syntax highlighting. --- diff --git a/website/index.html b/website/index.html index 9332647..704218d 100644 --- a/website/index.html +++ b/website/index.html @@ -118,7 +118,7 @@ a:hover { text-decoration: underline; }

Node

-

Purely asynchronous server-side I/O for Purely evented server-side I/O for V8 javascript.

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/"); +

To run the server, put the code into a file server.js +and call it with the node executable +

% /usr/local/bin/node server.js
+Server running at http://127.0.0.1:8000/
+
+

See the API documentation for more examples. @@ -152,10 +158,15 @@ puts("Server running at http://127.0.0.1:8000/");

Build

-

Node currently targets the Linux and Macintosh operating systems using -IA-32 or ARM processors. The build system requires Python. +

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. + +

V8, on which Node is built, supports only IA-32 and ARM processors. + +

The build system requires Python. -

./configure
+
./configure
 make
 make install
diff --git a/website/sh_main.js b/website/sh_main.js index 0a7764f..1d59dc7 100644 --- a/website/sh_main.js +++ b/website/sh_main.js @@ -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"]); } }