Skip to content

Commit 49ac4c0

Browse files
tansongyangCompuIves
authored andcommitted
Add .gitattributes (#203)
* Add .gitattributes This makes it easier for Windows users to contribute. See https://eslint.org/docs/rules/linebreak-style#using-this-rule-with-version-control-systems * Normalize line endings in parser-postcss.js
1 parent 3f3b505 commit 49ac4c0

File tree

2 files changed

+110
-108
lines changed

2 files changed

+110
-108
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* text=auto
2+
*.js text eol=lf

static/js/prettier/parser-postcss.js

Lines changed: 108 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -11567,24 +11567,24 @@ function Container(opts) {
1156711567
this.nodes.forEach(function (node) {
1156811568
node.parent = _this; // eslint-disable-line no-param-reassign
1156911569
});
11570-
} /**
11571-
* A node that contains other nodes and support traversing over them
11570+
} /**
11571+
* A node that contains other nodes and support traversing over them
1157211572
*/
1157311573

1157411574
Container.prototype = Object.create(_Node2.default.prototype);
1157511575
Container.constructor = _Node2.default;
1157611576

11577-
/**
11578-
* Iterate over descendant nodes of the node
11579-
*
11580-
* @param {RegExp|string} filter - Optional. Only nodes with node.type that
11581-
* satisfies the filter will be traversed over
11582-
* @param {function} cb - callback to call on each node. Takes theese params:
11583-
* node - the node being processed, i - it's index, nodes - the array
11584-
* of all nodes
11585-
* If false is returned, the iteration breaks
11586-
*
11587-
* @return (boolean) false, if the iteration was broken
11577+
/**
11578+
* Iterate over descendant nodes of the node
11579+
*
11580+
* @param {RegExp|string} filter - Optional. Only nodes with node.type that
11581+
* satisfies the filter will be traversed over
11582+
* @param {function} cb - callback to call on each node. Takes theese params:
11583+
* node - the node being processed, i - it's index, nodes - the array
11584+
* of all nodes
11585+
* If false is returned, the iteration breaks
11586+
*
11587+
* @return (boolean) false, if the iteration was broken
1158811588
*/
1158911589
Container.prototype.walk = function walk(filter, cb) {
1159011590
var hasFilter = typeof filter === 'string' || filter instanceof RegExp;
@@ -11604,15 +11604,15 @@ Container.prototype.walk = function walk(filter, cb) {
1160411604
return true;
1160511605
};
1160611606

11607-
/**
11608-
* Iterate over immediate children of the node
11609-
*
11610-
* @param {function} cb - callback to call on each node. Takes theese params:
11611-
* node - the node being processed, i - it's index, nodes - the array
11612-
* of all nodes
11613-
* If false is returned, the iteration breaks
11614-
*
11615-
* @return (boolean) false, if the iteration was broken
11607+
/**
11608+
* Iterate over immediate children of the node
11609+
*
11610+
* @param {function} cb - callback to call on each node. Takes theese params:
11611+
* node - the node being processed, i - it's index, nodes - the array
11612+
* of all nodes
11613+
* If false is returned, the iteration breaks
11614+
*
11615+
* @return (boolean) false, if the iteration was broken
1161611616
*/
1161711617
Container.prototype.each = function each() {
1161811618
var cb = arguments.length <= 0 || arguments[0] === undefined ? function () {} : arguments[0];
@@ -11638,8 +11638,8 @@ exports.default = Container;
1163811638
Object.defineProperty(exports, "__esModule", {
1163911639
value: true
1164011640
});
11641-
/**
11642-
* A very generic node. Pretty much any element of a media query
11641+
/**
11642+
* A very generic node. Pretty much any element of a media query
1164311643
*/
1164411644

1164511645
function Node(opts) {
@@ -15198,55 +15198,55 @@ module.exports = unique;
1519815198
/* 85 */
1519915199
/***/ (function(module, exports) {
1520015200

15201-
var g;
15202-
15203-
// This works in non-strict mode
15204-
g = (function() {
15205-
return this;
15206-
})();
15207-
15208-
try {
15209-
// This works if eval is allowed (see CSP)
15210-
g = g || Function("return this")() || (1,eval)("this");
15211-
} catch(e) {
15212-
// This works if the window reference is available
15213-
if(typeof window === "object")
15214-
g = window;
15215-
}
15216-
15217-
// g can still be undefined, but nothing to do about it...
15218-
// We return undefined, instead of nothing here, so it's
15219-
// easier to handle this case. if(!global) { ...}
15220-
15221-
module.exports = g;
15201+
var g;
15202+
15203+
// This works in non-strict mode
15204+
g = (function() {
15205+
return this;
15206+
})();
15207+
15208+
try {
15209+
// This works if eval is allowed (see CSP)
15210+
g = g || Function("return this")() || (1,eval)("this");
15211+
} catch(e) {
15212+
// This works if the window reference is available
15213+
if(typeof window === "object")
15214+
g = window;
15215+
}
15216+
15217+
// g can still be undefined, but nothing to do about it...
15218+
// We return undefined, instead of nothing here, so it's
15219+
// easier to handle this case. if(!global) { ...}
15220+
15221+
module.exports = g;
1522215222

1522315223

1522415224
/***/ }),
1522515225
/* 86 */
1522615226
/***/ (function(module, exports) {
1522715227

15228-
module.exports = function(module) {
15229-
if(!module.webpackPolyfill) {
15230-
module.deprecate = function() {};
15231-
module.paths = [];
15232-
// module.parent = undefined by default
15233-
if(!module.children) module.children = [];
15234-
Object.defineProperty(module, "loaded", {
15235-
enumerable: true,
15236-
get: function() {
15237-
return module.l;
15238-
}
15239-
});
15240-
Object.defineProperty(module, "id", {
15241-
enumerable: true,
15242-
get: function() {
15243-
return module.i;
15244-
}
15245-
});
15246-
module.webpackPolyfill = 1;
15247-
}
15248-
return module;
15249-
};
15228+
module.exports = function(module) {
15229+
if(!module.webpackPolyfill) {
15230+
module.deprecate = function() {};
15231+
module.paths = [];
15232+
// module.parent = undefined by default
15233+
if(!module.children) module.children = [];
15234+
Object.defineProperty(module, "loaded", {
15235+
enumerable: true,
15236+
get: function() {
15237+
return module.l;
15238+
}
15239+
});
15240+
Object.defineProperty(module, "id", {
15241+
enumerable: true,
15242+
get: function() {
15243+
return module.i;
15244+
}
15245+
});
15246+
module.webpackPolyfill = 1;
15247+
}
15248+
return module;
15249+
};
1525015250

1525115251

1525215252
/***/ }),
@@ -15293,25 +15293,25 @@ var _parsers = __webpack_require__(125);
1529315293

1529415294
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1529515295

15296-
/**
15297-
* Parses a media query list into an array of nodes. A typical node signature:
15298-
* {string} node.type -- one of: 'media-query', 'media-type', 'keyword',
15299-
* 'media-feature-expression', 'media-feature', 'colon', 'value'
15300-
* {string} node.value -- the contents of a particular element, trimmed
15301-
* e.g.: `screen`, `max-width`, `1024px`
15302-
* {string} node.after -- whitespaces that follow the element
15303-
* {string} node.before -- whitespaces that precede the element
15304-
* {string} node.sourceIndex -- the index of the element in a source media
15305-
* query list, 0-based
15306-
* {object} node.parent -- a link to the parent node (a container)
15307-
*
15308-
* Some nodes (media queries, media feature expressions) contain other nodes.
15309-
* They additionally have:
15310-
* {array} node.nodes -- an array of nodes of the type described here
15311-
* {funciton} node.each -- traverses direct children of the node, calling
15312-
* a callback for each one
15313-
* {funciton} node.walk -- traverses ALL descendants of the node, calling
15314-
* a callback for each one
15296+
/**
15297+
* Parses a media query list into an array of nodes. A typical node signature:
15298+
* {string} node.type -- one of: 'media-query', 'media-type', 'keyword',
15299+
* 'media-feature-expression', 'media-feature', 'colon', 'value'
15300+
* {string} node.value -- the contents of a particular element, trimmed
15301+
* e.g.: `screen`, `max-width`, `1024px`
15302+
* {string} node.after -- whitespaces that follow the element
15303+
* {string} node.before -- whitespaces that precede the element
15304+
* {string} node.sourceIndex -- the index of the element in a source media
15305+
* query list, 0-based
15306+
* {object} node.parent -- a link to the parent node (a container)
15307+
*
15308+
* Some nodes (media queries, media feature expressions) contain other nodes.
15309+
* They additionally have:
15310+
* {array} node.nodes -- an array of nodes of the type described here
15311+
* {funciton} node.each -- traverses direct children of the node, calling
15312+
* a callback for each one
15313+
* {funciton} node.walk -- traverses ALL descendants of the node, calling
15314+
* a callback for each one
1531515315
*/
1531615316

1531715317
function parseMedia(value) {
@@ -18215,14 +18215,14 @@ var _Container2 = _interopRequireDefault(_Container);
1821518215

1821618216
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1821718217

18218-
/**
18219-
* Parses a media feature expression, e.g. `max-width: 10px`, `(color)`
18220-
*
18221-
* @param {string} string - the source expression string, can be inside parens
18222-
* @param {Number} index - the index of `string` in the overall input
18223-
*
18224-
* @return {Array} an array of Nodes, the first element being a media feature,
18225-
* the secont - its value (may be missing)
18218+
/**
18219+
* Parses a media feature expression, e.g. `max-width: 10px`, `(color)`
18220+
*
18221+
* @param {string} string - the source expression string, can be inside parens
18222+
* @param {Number} index - the index of `string` in the overall input
18223+
*
18224+
* @return {Array} an array of Nodes, the first element being a media feature,
18225+
* the secont - its value (may be missing)
1822618226
*/
1822718227

1822818228
function parseMediaFeature(string) {
@@ -18321,13 +18321,13 @@ function parseMediaFeature(string) {
1832118321
return result;
1832218322
}
1832318323

18324-
/**
18325-
* Parses a media query, e.g. `screen and (color)`, `only tv`
18326-
*
18327-
* @param {string} string - the source media query string
18328-
* @param {Number} index - the index of `string` in the overall input
18329-
*
18330-
* @return {Array} an array of Nodes and Containers
18324+
/**
18325+
* Parses a media query, e.g. `screen and (color)`, `only tv`
18326+
*
18327+
* @param {string} string - the source media query string
18328+
* @param {Number} index - the index of `string` in the overall input
18329+
*
18330+
* @return {Array} an array of Nodes and Containers
1833118331
*/
1833218332

1833318333
function parseMediaQuery(string) {
@@ -18483,13 +18483,13 @@ function parseMediaQuery(string) {
1848318483
return result;
1848418484
}
1848518485

18486-
/**
18487-
* Parses a media query list. Takes a possible `url()` at the start into
18488-
* account, and divides the list into media queries that are parsed separately
18489-
*
18490-
* @param {string} string - the source media query list string
18491-
*
18492-
* @return {Array} an array of Nodes/Containers
18486+
/**
18487+
* Parses a media query list. Takes a possible `url()` at the start into
18488+
* account, and divides the list into media queries that are parsed separately
18489+
*
18490+
* @param {string} string - the source media query list string
18491+
*
18492+
* @return {Array} an array of Nodes/Containers
1849318493
*/
1849418494

1849518495
function parseMediaList(string) {

0 commit comments

Comments
 (0)