From a54b51e276e5d210dfe7d397f9bed8e039bbd70a Mon Sep 17 00:00:00 2001 From: Jeff Williams Date: Tue, 3 Jul 2012 18:40:15 -0700 Subject: [PATCH] detab files to eliminate mixed spaces/tabs this fixes a JSHint error that cannot be suppressed. --- rhino_modules/jsdoc/schema.js | 204 +++++++++++++++++----------------- rhino_modules/jsdoc/tag.js | 74 ++++++------ 2 files changed, 139 insertions(+), 139 deletions(-) diff --git a/rhino_modules/jsdoc/schema.js b/rhino_modules/jsdoc/schema.js index 8cd96bd1..2fa32dde 100644 --- a/rhino_modules/jsdoc/schema.js +++ b/rhino_modules/jsdoc/schema.js @@ -1,8 +1,8 @@ /** - @overview Schema for validating JSON produced by JSDoc Toolkit. - @author Michael Mathews - @license Apache License 2.0 - See file 'LICENSE.md' in this project. - @see + @overview Schema for validating JSON produced by JSDoc Toolkit. + @author Michael Mathews + @license Apache License 2.0 - See file 'LICENSE.md' in this project. + @see */ exports.jsdocSchema = { @@ -11,9 +11,9 @@ exports.jsdocSchema = { "type": "array", "items": { "type": "object", - "additionalProperties": false, + "additionalProperties": false, "properties": { - "author": { + "author": { "type": ["string", "array"], "optional": true, "items": { @@ -62,10 +62,10 @@ exports.jsdocSchema = { "type": "string" } }, - "deprecated": { // is usage of this symbol deprecated? - "type": ["string", "boolean"], - "optional": true - }, + "deprecated": { // is usage of this symbol deprecated? + "type": ["string", "boolean"], + "optional": true + }, "scope": { // how is this symbol attached to it's enclosing scope? "type": "string", "maxItems": 1, @@ -98,7 +98,7 @@ exports.jsdocSchema = { } }, "implements": { - "type": ["string", "array"], + "type": ["string", "array"], "optional": true, "items": { "type": "string" @@ -137,40 +137,40 @@ exports.jsdocSchema = { } }, "exception" : { - "optional": true, - "type": "object", - "properties": { - "type": { // what is the type of the value thrown? - "type": "array", - "optional": true, - "items": { - "type": "string" - } - }, - "description": { // a description of the thrown value - "type": "string", - "optional": true - } - }, - "additionalProperties": false + "optional": true, + "type": "object", + "properties": { + "type": { // what is the type of the value thrown? + "type": "array", + "optional": true, + "items": { + "type": "string" + } + }, + "description": { // a description of the thrown value + "type": "string", + "optional": true + } + }, + "additionalProperties": false }, "returns" : { - "optional": true, - "type": "object", - "properties": { - "type": { // what is the type of the value returned? - "type": ["string", "array"], - "optional": true, - "items": { - "type": "string" - } - }, - "description": { // a description of the returned value - "type": "string", - "optional": true - } - }, - "additionalProperties": false + "optional": true, + "type": "object", + "properties": { + "type": { // what is the type of the value returned? + "type": ["string", "array"], + "optional": true, + "items": { + "type": "string" + } + }, + "description": { // a description of the returned value + "type": "string", + "optional": true + } + }, + "additionalProperties": false }, "param" : { // are there function parameters associated with this doc? "type": "array", @@ -207,11 +207,11 @@ exports.jsdocSchema = { "optional": true } }, - "additionalProperties": false + "additionalProperties": false } }, "thisobj": { - "type": ["string", "array"], + "type": ["string", "array"], "optional": true, "items": { "type": "string" @@ -237,18 +237,18 @@ exports.jsdocSchema = { "optional": true, "maxItems": 1, "properties": { - "file": { // what is the name of the file this doc appears in? - "type": "string", - "optional": true, - "maxItems": 1 - }, - "line": { // on what line of the file does this doc appear? - "type": "number", - "optional": true, - "maxItems": 1 - } - }, - "additionalProperties": false + "file": { // what is the name of the file this doc appears in? + "type": "string", + "optional": true, + "maxItems": 1 + }, + "line": { // on what line of the file does this doc appear? + "type": "number", + "optional": true, + "maxItems": 1 + } + }, + "additionalProperties": false } } } @@ -258,51 +258,51 @@ exports.jsdocSchema = { "optional": true, "maxItems": 1, "properties": { - "project": { // to what project does this doc belong? - "type": "object", - "optional": true, - "maxItems": 1, - "properties": { - "name": { // the name of the project - "type": "string", - "maxItems": 1 - }, - "uri": { // the URI of the project - "type": "string", - "maxItems": 1, - "format": "uri" - }, - "version": { // the version of the project - "type": "string", - "maxItems": 1 - }, - "lang": { // the programming language used in the project - "type": "string", - "maxItems": 1 - } - }, - "additionalProperties": false - }, - "generated": { // some information about the running of the doc generator - "type": "object", - "optional": true, - "maxItems": 1, - "properties": { - "date": { // on what date and time was the doc generated? - "type": "string", - "maxItems": 1, - "optional": true, - "format": "date-time" - }, - "parser": { // what tool was used to generate the doc? - "type": "string", - "maxItems": 1, - "optional": true - } - }, - "additionalProperties": false - } - } + "project": { // to what project does this doc belong? + "type": "object", + "optional": true, + "maxItems": 1, + "properties": { + "name": { // the name of the project + "type": "string", + "maxItems": 1 + }, + "uri": { // the URI of the project + "type": "string", + "maxItems": 1, + "format": "uri" + }, + "version": { // the version of the project + "type": "string", + "maxItems": 1 + }, + "lang": { // the programming language used in the project + "type": "string", + "maxItems": 1 + } + }, + "additionalProperties": false + }, + "generated": { // some information about the running of the doc generator + "type": "object", + "optional": true, + "maxItems": 1, + "properties": { + "date": { // on what date and time was the doc generated? + "type": "string", + "maxItems": 1, + "optional": true, + "format": "date-time" + }, + "parser": { // what tool was used to generate the doc? + "type": "string", + "maxItems": 1, + "optional": true + } + }, + "additionalProperties": false + } + } } } }; \ No newline at end of file diff --git a/rhino_modules/jsdoc/tag.js b/rhino_modules/jsdoc/tag.js index 645b9242..b475833a 100644 --- a/rhino_modules/jsdoc/tag.js +++ b/rhino_modules/jsdoc/tag.js @@ -1,18 +1,18 @@ /** @overview @author Michael Mathews - @license Apache License 2.0 - See file 'LICENSE.md' in this project. + @license Apache License 2.0 - See file 'LICENSE.md' in this project. */ /** Functionality related to JSDoc tags. - @module jsdoc/tag - @requires jsdoc/tag/dictionary - @requires jsdoc/tag/validator - @requires jsdoc/tag/type + @module jsdoc/tag + @requires jsdoc/tag/dictionary + @requires jsdoc/tag/validator + @requires jsdoc/tag/type */ - + var jsdoc = { tag: { dictionary: require('jsdoc/tag/dictionary'), @@ -32,7 +32,7 @@ var jsdoc = { exports.Tag = function(tagTitle, tagBody, meta) { var tagDef = jsdoc.tag.dictionary.lookUp(tagTitle), meta = meta || {}; - + this.originalTitle = trim(tagTitle); /** The title part of the tag: @title text */ @@ -105,40 +105,40 @@ exports.Tag = function(tagTitle, tagBody, meta) { } function trim(text, newlines) { - if (!text) { return ''; } - - if (newlines) { - return text.replace(/^[\n\r\f]+|[\n\r\f]+$/g, ''); - } - else { - return text.replace(/^\s+|\s+$/g, ''); - } + if (!text) { return ''; } + + if (newlines) { + return text.replace(/^[\n\r\f]+|[\n\r\f]+$/g, ''); + } + else { + return text.replace(/^\s+|\s+$/g, ''); + } } /** - Parse the parameter name and parameter desc from the tag text. - @inner - @method parseParamText - @memberof module:jsdoc/tag - @param {string} tagText - @returns {Array.} [pname, pdesc, poptional, pdefault]. + Parse the parameter name and parameter desc from the tag text. + @inner + @method parseParamText + @memberof module:jsdoc/tag + @param {string} tagText + @returns {Array.} [pname, pdesc, poptional, pdefault]. */ function parseParamText(tagText) { - var pname, pdesc, poptional, pdefault; - - // like: pname, pname pdesc, or name - pdesc - tagText.match(/^(\[[^\]]+\]|\S+)((?:\s*\-\s*|\s+)(\S[\s\S]*))?$/); - pname = RegExp.$1; - pdesc = RegExp.$3; + var pname, pdesc, poptional, pdefault; - if ( /^\[\s*(.+?)\s*\]$/.test(pname) ) { - pname = RegExp.$1; - poptional = true; - - if ( /^(.+?)\s*=\s*(.+)$/.test(pname) ) { - pname = RegExp.$1; - pdefault = RegExp.$2; - } - } - return [pname, pdesc, poptional, pdefault]; + // like: pname, pname pdesc, or name - pdesc + tagText.match(/^(\[[^\]]+\]|\S+)((?:\s*\-\s*|\s+)(\S[\s\S]*))?$/); + pname = RegExp.$1; + pdesc = RegExp.$3; + + if ( /^\[\s*(.+?)\s*\]$/.test(pname) ) { + pname = RegExp.$1; + poptional = true; + + if ( /^(.+?)\s*=\s*(.+)$/.test(pname) ) { + pname = RegExp.$1; + pdefault = RegExp.$2; + } + } + return [pname, pdesc, poptional, pdefault]; }