Skip to content

Commit fd43934

Browse files
save file
1 parent 9da7c65 commit fd43934

File tree

1 file changed

+22
-20
lines changed

1 file changed

+22
-20
lines changed

utils/editors/js-console/html/output-console/v2.0/output-console-v2.0.html

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -684,26 +684,28 @@
684684

685685
function format(args){
686686

687-
if (typeof args[0] !== "string") return args;
688-
689-
let fmt = args[0];
690-
let out = [];
691-
let argIndex = 1;
692-
693-
out.push(fmt.replace(/%[sdifoO]/g, (match) => {
694-
695-
const val = args[argIndex++];
696-
switch (match) {
697-
case "%s": return ''+val;
698-
case "%d":
699-
case "%i": return parseInt(val, 10);
700-
case "%f": return parseFloat(val);
701-
case "%o":
702-
case "%O": return format.fn(val);
703-
default:
704-
return match;
705-
}
706-
687+
if(typeof args[0]!=='string')return args;
688+
689+
let fmt = args[0];
690+
let out = [];
691+
let argIndex = 1;
692+
693+
out.push(fmt.replace(/%[sdifoO]/g,match=>{
694+
695+
var val = args[argIndex++];
696+
697+
switch (match) {
698+
699+
case "%s" : return ''+val;
700+
case "%d" :
701+
case "%i" : return parseInt(val, 10);
702+
case "%f" : return parseFloat(val);
703+
case "%o" :
704+
case "%O" : return format.fn(val);
705+
default : return match;
706+
707+
}//switch
708+
707709
}));
708710

709711
// Append any remaining args

0 commit comments

Comments
 (0)