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