X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=JSDOC%2FDocTag.js;h=e761d1f8f99a05f42a6a94461ba269d2b475c611;hb=77e2bd48399f4c9f311aa74722c4fb1ca9426e63;hp=692d1f4c860910fd1d2a76ea17bdc211401f4888;hpb=f09257f2222075d34e96d061cb24430de9973463;p=gnome.introspection-doc-generator diff --git a/JSDOC/DocTag.js b/JSDOC/DocTag.js index 692d1f4..e761d1f 100644 --- a/JSDOC/DocTag.js +++ b/JSDOC/DocTag.js @@ -26,6 +26,7 @@ DocTag = XObject.define( this.isOptional = false; this.defaultValue = ""; this.desc = ""; + this.optvalues = false; if (typeof src != "undefined") { this.parse(src); } @@ -90,6 +91,24 @@ DocTag = XObject.define( if (Options.LOG) Options.LOG.warn(e); else throw e; } + + // if type == @cfg, and matches (|....|...) + + src = src.trim(); + if (this.title == "cfg" && src.match(/^\([^)]+\)/)) { + var m = src.match(/^\(([^)]+)\)/); + if (m[1].match(/\|/)) { + var opts = m[1].split(/\|/); + this.optvalues = opts; + src = src.substring(m[0].length).trim(); + + + } + + + } + + this.desc = src; // whatever is left // example tags need to have whitespace preserved