Skip to content

Commit

Permalink
Merge pull request #191 from Akhrameev/akhrameev/doubled_spaces_fix
Browse files Browse the repository at this point in the history
doubled spaces fix
  • Loading branch information
IvanMathy authored Mar 16, 2021
2 parents 460f6f3 + 54c1b77 commit adcd6ce
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Boop/Boop/scripts/RemoveDuplicates.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

function main(input) {
let lines = input.text.split('\n')
let out = unique(lines)
let out = unique(lines)

input.text = out.join('\n')

Expand Down
20 changes: 10 additions & 10 deletions Boop/Boop/scripts/lib/vkBeautify.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
}
}

return (str.charAt(0) === '\n') ? str.slice(1) : str;
return (str.charAt(0) === '\n') ? str.slice(1) : str;
};

vkbeautify.prototype.css = function(text, step) {
Expand All @@ -142,13 +142,13 @@

for(ix=0;ix<len;ix++) {

if( /{/.exec(ar[ix])) {
if( /{/.exec(ar[ix])) {
str += shift[deep++]+ar[ix];
} else
if( /}/.exec(ar[ix])) {
if( /}/.exec(ar[ix])) {
str += shift[--deep]+ar[ix];
} else
if( /\*\\/.exec(ar[ix])) {
if( /\*\\/.exec(ar[ix])) {
str += shift[deep]+ar[ix];
}
else {
Expand Down Expand Up @@ -246,25 +246,25 @@

parenthesisLevel = isSubquery(ar[ix], parenthesisLevel);

if( /\s*\s*SELECT\s*/.exec(ar[ix])) {
if( /\s*\s*SELECT\s*/.exec(ar[ix])) {
ar[ix] = ar[ix].replace(/,/g,",\n"+tab+tab+"");
}

if( /\s*\s*SET\s*/.exec(ar[ix])) {
if( /\s*\s*SET\s*/.exec(ar[ix])) {
ar[ix] = ar[ix].replace(/,/g,",\n"+tab+tab+"");
}

if( /\s*\(\s*SELECT\s*/.exec(ar[ix])) {
if( /\s*\(\s*SELECT\s*/.exec(ar[ix])) {
deep++;
str += shift[deep]+ar[ix];
} else
if( /'/.exec(ar[ix]) ) {
if( /'/.exec(ar[ix]) ) {
if(parenthesisLevel<1 && deep) {
deep--;
}
str += ar[ix];
}
else {
else {
str += shift[deep]+ar[ix];
if(parenthesisLevel<1 && deep) {
deep--;
Expand Down Expand Up @@ -307,4 +307,4 @@

})();



0 comments on commit adcd6ce

Please sign in to comment.