Ox.doc: support inline properties prefixed with '.', add FIXMEs

This commit is contained in:
rolux 2012-06-23 20:22:09 +02:00
parent ed6a76ae24
commit 05828db75d

View file

@ -309,6 +309,7 @@ Ox.doc = (function() {
if (section) {
item.section = section;
}
// FIXME: should become !/^\./.test(item.name)
if (/^[A-Z]/.test(item.name)) {
// main item
// remove leading linebreaks and whitespace
@ -317,6 +318,8 @@ Ox.doc = (function() {
items.push(item);
} else {
// property of an item
// FIXME: should become item.name.slice(1)
item.name = item.name.replace(/^\./, '');
lastItem = Ox.last(items);
parent = lastItem.types[0] == 'function'
&& lastItem.returns