Use a single declaration per line

This commit is contained in:
Rob Garrison 2017-07-14 03:46:10 -05:00
parent 61327bfaf1
commit 1a630033bd
3 changed files with 13 additions and 7 deletions

View File

@ -189,7 +189,8 @@ function filterStylesInternal({
const needSections = asHash || matchUrl !== null; const needSections = asHash || matchUrl !== null;
for (let i = 0, style; (style = styles[i]); i++) { let style;
for (let i = 0; (style = styles[i]); i++) {
if ((enabled === null || style.enabled == enabled) if ((enabled === null || style.enabled == enabled)
&& (url === null || style.url == url) && (url === null || style.url == url)
&& (id === null || style.id == id)) { && (id === null || style.id == id)) {
@ -230,7 +231,8 @@ function saveStyle(style) {
if (!style.name) { if (!style.name) {
delete style.name; delete style.name;
} }
let existed, codeIsUpdated; let existed;
let codeIsUpdated;
if (reason == 'update' || reason == 'update-digest') { if (reason == 'update' || reason == 'update-digest') {
return calcStyleDigest(style).then(digest => { return calcStyleDigest(style).then(digest => {
style.originalDigest = digest; style.originalDigest = digest;

View File

@ -602,8 +602,8 @@ function addSection(event, section) {
} }
function removeAppliesTo(event) { function removeAppliesTo(event) {
const appliesTo = event.target.parentNode, const appliesTo = event.target.parentNode;
appliesToList = appliesTo.parentNode; const appliesToList = appliesTo.parentNode;
removeAreaAndSetDirty(appliesTo); removeAreaAndSetDirty(appliesTo);
if (!appliesToList.hasChildNodes()) { if (!appliesToList.hasChildNodes()) {
addAppliesTo(appliesToList); addAppliesTo(appliesToList);
@ -744,7 +744,8 @@ function setupGlobalSearch() {
&& searchAppliesTo(activeCM)) { && searchAppliesTo(activeCM)) {
return; return;
} }
for (let i = 0, cm = activeCM; i < editors.length; i++) { let cm = activeCM;
for (let i = 0; i < editors.length; i++) {
state = updateState(cm); state = updateState(cm);
if (!cm.hasFocus()) { if (!cm.hasFocus()) {
pos = reverse ? CodeMirror.Pos(cm.lastLine()) : CodeMirror.Pos(0, 0); pos = reverse ? CodeMirror.Pos(cm.lastLine()) : CodeMirror.Pos(0, 0);
@ -799,7 +800,9 @@ function setupGlobalSearch() {
} }
function replace(activeCM, all) { function replace(activeCM, all) {
let queue, query, replacement; let queue;
let query;
let replacement;
activeCM = focusClosestCM(activeCM); activeCM = focusClosestCM(activeCM);
customizeOpenDialog(activeCM, template[all ? 'replaceAll' : 'replace'], function(txt) { customizeOpenDialog(activeCM, template[all ? 'replaceAll' : 'replace'], function(txt) {
query = txt; query = txt;

View File

@ -364,7 +364,8 @@
} }
} }
outputPosCol = 0; outputPosCol = 0;
let i = output.length, token; let i = output.length;
let token;
while (--i >= 0 && (token = output[i]) != '\n') { while (--i >= 0 && (token = output[i]) != '\n') {
outputPosCol += token.length; outputPosCol += token.length;
} }