From f01ab9ed40e621b0159f559e78a9343770e599c1 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Thu, 15 Jul 2010 10:07:34 -0700 Subject: [PATCH] Index.html --- Makefile | 2 +- docs.html => index.html | 126 ++++++++++++++++++++-------------------- 2 files changed, 64 insertions(+), 64 deletions(-) rename docs.html => index.html (99%) diff --git a/Makefile b/Makefile index 0405d11d..12ba8e62 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,6 @@ docs: uninstall install --desc "JavaScript documentation parser for [node](http://ndoejs.org).\ Check out the [Github Repo](http://github.com/visionmedia/dox) for the \ source and installation guide." \ - lib/*.js > docs.html + lib/*.js > index.html .PHONY: install uninstall docs \ No newline at end of file diff --git a/docs.html b/index.html similarity index 99% rename from docs.html rename to index.html index 57e15b46..44ddf67c 100644 --- a/docs.html +++ b/index.html @@ -108,7 +108,69 @@ - +

Dox

JavaScript documentation parser for node. Check out the Github Repo for the source and installation guide.

index

lib/index.js
+ + + + + + + + + + + - - - - - - - - - - -

Dox

JavaScript documentation parser for node. Check out the Github Repo for the source and installation guide.

utils

lib/utils.js
+

Check if the given string of docs appears to be private.

+ +

+ +
  • param: String str

  • return: Boolean

  • api: public

+
+
exports.isPrivate = function(str) {
+    return str.indexOf('@private') >= 0
+        || str.indexOf('@api private') >= 0;
+}
+
+

Convert the given string of jsdoc to markdown.

+ +

+ +
  • param: String str

  • return: String

  • api: public

+
+
exports.toMarkdown = function(str) {
+    var first = true;
+    return str
+        .replace(/^((?:[A-Z]\w* ?)+):/gm, '## $1')
+        .replace(/^ *@(\w+) *\{([^}]+)\}( *[^\n]+)?/gm, function(_, key, type, desc){
+            var prefix = '';
+            if (first) {
+                first = false;
+                prefix = '## \n';
+            }
+            return prefix + '\n - **' + key + '**: _' + type.split(/ *[|\/] */).join(' | ') + '_ ' + (desc || '') + '\n';
+        })
+        .replace(/^ *@(\w+) *(\w+)/gm, ' - **$1**: _$2_\n');
+}
+
+

Escape the given string of html.

+ +

Examples

+ +
escape('<foo>');
+// => "&lt;foo&gt;"
+ +

+ +
  • param: String html

  • return: String

  • api: public

+
+
exports.escape = function(html){
+    return String(html)
+        .replace(/&(?!\w+;)/g, '&')
+        .replace(/</g, '<')
+        .replace(/>/g, '>')
+        .replace(/"/g, '"');
+}
+

index

lib/index.js

Module dependencies.

@@ -380,67 +442,5 @@

return html.join('\n'); };

utils

lib/utils.js
-

Check if the given string of docs appears to be private.

- -

- -
  • param: String str

  • return: Boolean

  • api: public

-
-
exports.isPrivate = function(str) {
-    return str.indexOf('@private') &gt;= 0
-        || str.indexOf('@api private') &gt;= 0;
-}
-
-

Convert the given string of jsdoc to markdown.

- -

- -
  • param: String str

  • return: String

  • api: public

-
-
exports.toMarkdown = function(str) {
-    var first = true;
-    return str
-        .replace(/^((?:[A-Z]\w* ?)+):/gm, '## $1')
-        .replace(/^ *@(\w+) *\{([^}]+)\}( *[^\n]+)?/gm, function(_, key, type, desc){
-            var prefix = '';
-            if (first) {
-                first = false;
-                prefix = '## \n';
-            }
-            return prefix + '\n - **' + key + '**: _' + type.split(/ *[|\/] */).join(' | ') + '_ ' + (desc || '') + '\n';
-        })
-        .replace(/^ *@(\w+) *(\w+)/gm, ' - **$1**: _$2_\n');
-}
-
-

Escape the given string of html.

- -

Examples

- -
escape('<foo>');
-// => "&lt;foo&gt;"
- -

- -
  • param: String html

  • return: String

  • api: public

-
-
exports.escape = function(html){
-    return String(html)
-        .replace(/&(?!\w+;)/g, '&')
-        .replace(/</g, '<')
-        .replace(/>/g, '>')
-        .replace(/"/g, '"');
-}
-
\ No newline at end of file