Ox.doc: fix regular expressions
This commit is contained in:
parent
ba954cfedf
commit
38ba971dab
1 changed files with 3 additions and 2 deletions
|
@ -83,10 +83,10 @@ Ox.doc <f> Generates documentation for annotated JavaScript
|
|||
@*/
|
||||
Ox.doc = (function() {
|
||||
var re = {
|
||||
item: /^(.+?) <(.+?)> (.+?)$/,
|
||||
item: /^(.+?)\s+<(.+?)>\s+(.+?)$/,
|
||||
multiline: /^\/\*\@.*?\n([\w\W]+)\n.*?\@?\*\/$/,
|
||||
script: /\n(\s*<script>s*\n[\w\W]+\n\s*<\/script>s*)/g,
|
||||
signature: /(\(.*?\)) \->(.*)/,
|
||||
signature: /^(\(.*?\))\s+\->(.*)/,
|
||||
singleline: /^\/\/@\s*(.*?)\s*$/,
|
||||
test: /\n(\s*> .+\n.+?)/g,
|
||||
},
|
||||
|
@ -228,6 +228,7 @@ Ox.doc = (function() {
|
|||
item.tests = item.tests || [];
|
||||
item.tests.push(parseTest(line));
|
||||
} else if ((subitem = parseItem(line))) {
|
||||
item.name == 'Ox.getset' && Ox.print(line, subitem)
|
||||
if (subitem.signature) {
|
||||
item.returns = item.returns || [];
|
||||
item.returns.push(parseNode(node));
|
||||
|
|
Loading…
Reference in a new issue