From 1c98a3198a61441e68d3fcbab0028b08470f7f64 Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 30 May 2012 13:31:42 +0200 Subject: [PATCH] correct documentation, use markdown --- source/Ox/js/JavaScript.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source/Ox/js/JavaScript.js b/source/Ox/js/JavaScript.js index eb0359ed..d39d2b5a 100644 --- a/source/Ox/js/JavaScript.js +++ b/source/Ox/js/JavaScript.js @@ -20,7 +20,7 @@ Ox.doc Generates documentation for annotated JavaScript file File name line Line number name Name of the item - order <[s]> Order of signature, arguments, properties + order <[s]> Order of returns, arguments, properties Present if the type of the item is "function" properties <[o]|u> Properties (array of doc objects) Present if the type of the item is @@ -114,7 +114,7 @@ Ox.doc = (function() { '\'"'.indexOf(matches[2].slice(-2, -1)) > -1 ) ? Ox.extend( parseName(matches[1]), - parseType(matches[2]), + parseTypes(matches[2]), {summary: matches[3].trim()} ) : null; } @@ -158,6 +158,10 @@ Ox.doc = (function() { } } }); + item.summary = Ox.parseMarkdown(item.summary); + if (item.description) { + item.description = Ox.parseMarkdown(item.description) + } if (item.types[0] == 'function') { item.order = Ox.unique(order); } @@ -303,7 +307,7 @@ Ox.doc = (function() { } return node; } - function parseType(string) { + function parseTypes(string) { // returns {types: [""]} // or {types: [""], default: ""} // or {types: [""], super: ""}