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() {
|
Ox.doc = (function() {
|
||||||
var re = {
|
var re = {
|
||||||
item: /^(.+?) <(.+?)> (.+?)$/,
|
item: /^(.+?)\s+<(.+?)>\s+(.+?)$/,
|
||||||
multiline: /^\/\*\@.*?\n([\w\W]+)\n.*?\@?\*\/$/,
|
multiline: /^\/\*\@.*?\n([\w\W]+)\n.*?\@?\*\/$/,
|
||||||
script: /\n(\s*<script>s*\n[\w\W]+\n\s*<\/script>s*)/g,
|
script: /\n(\s*<script>s*\n[\w\W]+\n\s*<\/script>s*)/g,
|
||||||
signature: /(\(.*?\)) \->(.*)/,
|
signature: /^(\(.*?\))\s+\->(.*)/,
|
||||||
singleline: /^\/\/@\s*(.*?)\s*$/,
|
singleline: /^\/\/@\s*(.*?)\s*$/,
|
||||||
test: /\n(\s*> .+\n.+?)/g,
|
test: /\n(\s*> .+\n.+?)/g,
|
||||||
},
|
},
|
||||||
|
@ -228,6 +228,7 @@ Ox.doc = (function() {
|
||||||
item.tests = item.tests || [];
|
item.tests = item.tests || [];
|
||||||
item.tests.push(parseTest(line));
|
item.tests.push(parseTest(line));
|
||||||
} else if ((subitem = parseItem(line))) {
|
} else if ((subitem = parseItem(line))) {
|
||||||
|
item.name == 'Ox.getset' && Ox.print(line, subitem)
|
||||||
if (subitem.signature) {
|
if (subitem.signature) {
|
||||||
item.returns = item.returns || [];
|
item.returns = item.returns || [];
|
||||||
item.returns.push(parseNode(node));
|
item.returns.push(parseNode(node));
|
||||||
|
|
Loading…
Reference in a new issue