mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
detab files to eliminate mixed spaces/tabs
this fixes a JSHint error that cannot be suppressed.
This commit is contained in:
parent
ee858cc894
commit
a54b51e276
@ -1,8 +1,8 @@
|
||||
/**
|
||||
@overview Schema for validating JSON produced by JSDoc Toolkit.
|
||||
@author Michael Mathews <micmath@gmail.com>
|
||||
@license Apache License 2.0 - See file 'LICENSE.md' in this project.
|
||||
@see <http://tools.ietf.org/html/draft-zyp-json-schema-02>
|
||||
@overview Schema for validating JSON produced by JSDoc Toolkit.
|
||||
@author Michael Mathews <micmath@gmail.com>
|
||||
@license Apache License 2.0 - See file 'LICENSE.md' in this project.
|
||||
@see <http://tools.ietf.org/html/draft-zyp-json-schema-02>
|
||||
*/
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -1,18 +1,18 @@
|
||||
/**
|
||||
@overview
|
||||
@author Michael Mathews <micmath@gmail.com>
|
||||
@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.<string, string, boolean, boolean>} [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.<string, string, boolean, boolean>} [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];
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user