Clean up doc intro and syntax highlighting.
authorRyan <ry@tinyclouds.org>
Tue, 26 May 2009 16:06:53 +0000 (18:06 +0200)
committerRyan <ry@tinyclouds.org>
Tue, 26 May 2009 16:06:53 +0000 (18:06 +0200)
website/index.html
website/sh_main.js

index 9332647..704218d 100644 (file)
@@ -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.
+
+<p>V8, on which Node is built, supports only IA-32 and ARM processors. 
+
+<p> The build system requires Python.
 
-<pre>./configure
+<pre class="sh_none">./configure
 make
 make install</pre>
 
index 0a7764f..1d59dc7 100644 (file)
@@ -516,9 +516,13 @@ function highlight(prefix, suffix, tag) {
     var element = nodeList.item(i);\r
     var htmlClasses = sh_getClasses(element);\r
     var highlighted = false;\r
+    var donthighlight = false;\r
     for (var j = 0; j < htmlClasses.length; j++) {\r
       var htmlClass = htmlClasses[j].toLowerCase();\r
-      if (htmlClass === 'sh_none') break;\r
+      if (htmlClass === 'sh_none') {\r
+        donthighlight = true\r
+        continue;\r
+      }\r
       if (htmlClass.substr(0, 3) === 'sh_') {\r
         var language = htmlClass.substring(3);\r
         if (language in sh_languages) {\r
@@ -534,7 +538,7 @@ function highlight(prefix, suffix, tag) {
         break;\r
       }\r
     }\r
-    if (highlighted === false) {\r
+    if (highlighted === false && donthighlight == false) {\r
       sh_highlightElement(element, sh_languages["javascript"]);\r
     }\r
   }\r