Code formatting/styling

This commit is contained in:
dxdc 2019-04-10 09:48:53 -05:00
parent 338e15ee81
commit ce2a6a2943

View file

@ -155,20 +155,19 @@ kpxcFields.inputQueryPattern = 'input[type=\'text\'], input[type=\'email\'], inp
// copied from Sizzle.js
kpxcFields.rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g;
kpxcFields.fcssescape = function(ch, asCodePoint) {
if (asCodePoint) {
// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
if (ch === "\0") {
return "\uFFFD";
}
// Control characters and (dependent upon position) numbers get escaped as code points
return ch.slice(0, -1) + "\\" + ch.charCodeAt(ch.length - 1).toString(16) + " ";
if (asCodePoint) {
// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
if (ch === '\0') {
return '\uFFFD';
}
// Other potentially-special ASCII characters get backslash-escaped
return "\\" + ch;
};
// Control characters and (dependent upon position) numbers get escaped as code points
return ch.slice(0, -1) + '\\' + ch.charCodeAt(ch.length - 1).toString(16) + ' ';
}
// Other potentially-special ASCII characters get backslash-escaped
return '\\' + ch;
};
// Unique number as new IDs for input fields
kpxcFields.uniqueNumber = 342845638;
@ -194,7 +193,7 @@ kpxcFields.setUniqueId = function(field) {
};
kpxcFields.prepareId = function(id) {
return (id + "").replace(kpxcFields.rcssescape, kpxcFields.fcssescape);
return (id + '').replace(kpxcFields.rcssescape, kpxcFields.fcssescape);
};
/**