PageRenderTime 6ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/jsdoc_toolkit-2.0.1/jsdoc-toolkit/app/plugins/commentSrcJson.js

http://jsdoc-toolkit.googlecode.com/
JavaScript | 19 lines | 18 code | 0 blank | 1 comment | 2 complexity | d239965ae0e3c303d9e8b919aab2336a MD5 | raw file
 1JSDOC.PluginManager.registerPlugin(
 2	"JSDOC.commentSrcJson",
 3	{
 4		onDocCommentSrc: function(commentSrc) {
 5			var json;
 6			if (/^\s*@json\b/.test(commentSrc)) {
 7				commentSrc = commentSrc.replace("@json", "");
 8				eval("json = "+commentSrc);
 9				var tagged = "";
10				for (var i in json) {
11					var tag = json[i];
12					// todo handle cases where tag is an object
13					tagged += "@"+i+" "+tag+"\n";
14				}
15				return tagged;
16			}
17		}
18	}
19);