Skip to content

Commit 0049e1a

Browse files
wesleychofcaballero
authored andcommitted
chore: normalize line endings
- This adds the necessary files (.gitattributes and .editorconfig) to ensure line endings use lf
1 parent 6de7ab3 commit 0049e1a

File tree

5 files changed

+51
-27
lines changed

5 files changed

+51
-27
lines changed

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# This file is for unifying the coding style for different editors and IDEs
2+
# editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
# Tabs in JS unless otherwise specified
13+
[**.js]
14+
indent_style = space
15+
indent_size = 2
16+
17+
[*.md]
18+
trim_trailing_whitespace = false

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*.html eol=lf
2+
*.css eol=lf
3+
*.js eol=lf
4+
*.md eol=lf
5+
*.json eol=lf
6+
*.yml eol=lf

dist/select.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2038,15 +2038,15 @@ uis.service('uisRepeatParser', ['uiSelectMinErr','$parse', function(uiSelectMinE
20382038
// When using (key,value) ui-select requires filters to be extracted, since the object
20392039
// is converted to an array for $select.items
20402040
// (in which case the filters need to be reapplied)
2041-
if (match[3]) {
2042-
// Remove any enclosing parenthesis
2043-
source = match[5].replace(/(^\()|(\)$)/g, '');
2044-
// match all after | but not after ||
2045-
var filterMatch = match[5].match(/^\s*(?:[\s\S]+?)(?:[^\|]|\|\|)+([\s\S]*)\s*$/);
2046-
if(filterMatch && filterMatch[1].trim()) {
2047-
filters = filterMatch[1];
2048-
source = source.replace(filters, '');
2049-
}
2041+
if (match[3]) {
2042+
// Remove any enclosing parenthesis
2043+
source = match[5].replace(/(^\()|(\)$)/g, '');
2044+
// match all after | but not after ||
2045+
var filterMatch = match[5].match(/^\s*(?:[\s\S]+?)(?:[^\|]|\|\|)+([\s\S]*)\s*$/);
2046+
if(filterMatch && filterMatch[1].trim()) {
2047+
filters = filterMatch[1];
2048+
source = source.replace(filters, '');
2049+
}
20502050
}
20512051

20522052
return {

src/uiSelectMatchDirective.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ uis.directive('uiSelectMatch', ['uiSelectConfig', function(uiSelectConfig) {
3535
}
3636
};
3737

38-
function getAttribute(elem, attribute) {
39-
if (elem[0].hasAttribute(attribute))
40-
return elem.attr(attribute);
41-
42-
if (elem[0].hasAttribute('data-' + attribute))
43-
return elem.attr('data-' + attribute);
44-
45-
if (elem[0].hasAttribute('x-' + attribute))
46-
return elem.attr('x-' + attribute);
38+
function getAttribute(elem, attribute) {
39+
if (elem[0].hasAttribute(attribute))
40+
return elem.attr(attribute);
41+
42+
if (elem[0].hasAttribute('data-' + attribute))
43+
return elem.attr('data-' + attribute);
44+
45+
if (elem[0].hasAttribute('x-' + attribute))
46+
return elem.attr('x-' + attribute);
4747
}
4848
}]);

src/uisRepeatParserService.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ uis.service('uisRepeatParser', ['uiSelectMinErr','$parse', function(uiSelectMinE
4747
// When using (key,value) ui-select requires filters to be extracted, since the object
4848
// is converted to an array for $select.items
4949
// (in which case the filters need to be reapplied)
50-
if (match[3]) {
51-
// Remove any enclosing parenthesis
52-
source = match[5].replace(/(^\()|(\)$)/g, '');
53-
// match all after | but not after ||
54-
var filterMatch = match[5].match(/^\s*(?:[\s\S]+?)(?:[^\|]|\|\|)+([\s\S]*)\s*$/);
55-
if(filterMatch && filterMatch[1].trim()) {
56-
filters = filterMatch[1];
57-
source = source.replace(filters, '');
58-
}
50+
if (match[3]) {
51+
// Remove any enclosing parenthesis
52+
source = match[5].replace(/(^\()|(\)$)/g, '');
53+
// match all after | but not after ||
54+
var filterMatch = match[5].match(/^\s*(?:[\s\S]+?)(?:[^\|]|\|\|)+([\s\S]*)\s*$/);
55+
if(filterMatch && filterMatch[1].trim()) {
56+
filters = filterMatch[1];
57+
source = source.replace(filters, '');
58+
}
5959
}
6060

6161
return {

0 commit comments

Comments
 (0)