From 24ebd0360a2e9529600044bc46a574687595a1e3 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 26 May 2009 18:06:53 +0200 Subject: [PATCH] Clean up doc intro and syntax highlighting. --- website/index.html | 19 +++++++++++++++---- website/sh_main.js | 8 ++++++-- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/website/index.html b/website/index.html index 933264775b..704218db1f 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 0a7764fe0a..1d59dc7dcf 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"]); } }