minor clean-ups (#5282)
This commit is contained in:
@@ -521,9 +521,7 @@ function OutputStream(options) {
|
||||
indent();
|
||||
}
|
||||
var preamble = options.preamble;
|
||||
if (preamble) {
|
||||
print(preamble.replace(/\r\n?|[\n\u2028\u2029]|\s*$/g, "\n"));
|
||||
}
|
||||
if (preamble) print(preamble.replace(/\r\n?|\u2028|\u2029|(^|\S)\s*$/g, "$1\n"));
|
||||
}
|
||||
|
||||
comments = comments.filter(comment_filter, node);
|
||||
@@ -1870,8 +1868,8 @@ function OutputStream(options) {
|
||||
len = match[0].length;
|
||||
digits = str.slice(len);
|
||||
candidates.push(digits + "e-" + (digits.length + len - 1));
|
||||
} else if (match = /0+$/.exec(str)) {
|
||||
len = match[0].length;
|
||||
} else if (match = /[^0]0+$/.exec(str)) {
|
||||
len = match[0].length - 1;
|
||||
candidates.push(str.slice(0, -len) + "e" + len);
|
||||
} else if (match = /^(\d)\.(\d+)e(-?\d+)$/.exec(str)) {
|
||||
candidates.push(match[1] + match[2] + "e" + (match[3] - match[2].length));
|
||||
|
||||
Reference in New Issue
Block a user