correct documentation, use markdown
This commit is contained in:
parent
ca05f24a6a
commit
1c98a3198a
1 changed files with 7 additions and 3 deletions
|
@ -20,7 +20,7 @@ Ox.doc <f> Generates documentation for annotated JavaScript
|
||||||
file <s> File name
|
file <s> File name
|
||||||
line <n> Line number
|
line <n> Line number
|
||||||
name <s> Name of the item
|
name <s> 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"
|
Present if the type of the item is "function"
|
||||||
properties <[o]|u> Properties (array of doc objects)
|
properties <[o]|u> Properties (array of doc objects)
|
||||||
Present if the <code>type</code> of the item is
|
Present if the <code>type</code> of the item is
|
||||||
|
@ -114,7 +114,7 @@ Ox.doc = (function() {
|
||||||
'\'"'.indexOf(matches[2].slice(-2, -1)) > -1
|
'\'"'.indexOf(matches[2].slice(-2, -1)) > -1
|
||||||
) ? Ox.extend(
|
) ? Ox.extend(
|
||||||
parseName(matches[1]),
|
parseName(matches[1]),
|
||||||
parseType(matches[2]),
|
parseTypes(matches[2]),
|
||||||
{summary: matches[3].trim()}
|
{summary: matches[3].trim()}
|
||||||
) : null;
|
) : 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') {
|
if (item.types[0] == 'function') {
|
||||||
item.order = Ox.unique(order);
|
item.order = Ox.unique(order);
|
||||||
}
|
}
|
||||||
|
@ -303,7 +307,7 @@ Ox.doc = (function() {
|
||||||
}
|
}
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
function parseType(string) {
|
function parseTypes(string) {
|
||||||
// returns {types: [""]}
|
// returns {types: [""]}
|
||||||
// or {types: [""], default: ""}
|
// or {types: [""], default: ""}
|
||||||
// or {types: [""], super: ""}
|
// or {types: [""], super: ""}
|
||||||
|
|
Loading…
Reference in a new issue