Enforce space before code block
This commit is contained in:
parent
0ae5c54ab3
commit
3f1cda2e37
|
@ -39,5 +39,6 @@
|
|||
"keyword-spacing": ["error"],
|
||||
"no-trailing-spaces": ["error"],
|
||||
"semi": ["error"],
|
||||
"space-before-blocks": ["error"],
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import DOMKeyTable from "./domkeytable.js";
|
|||
import * as browser from "../util/browser.js";
|
||||
|
||||
// Get 'KeyboardEvent.code', handling legacy browsers
|
||||
export function getKeycode(evt){
|
||||
export function getKeycode(evt) {
|
||||
// Are we getting proper key identifiers?
|
||||
// (unfortunately Firefox and Chrome are crappy here and gives
|
||||
// us an empty string on some platforms, rather than leaving it
|
||||
|
@ -125,7 +125,7 @@ export function getKey(evt) {
|
|||
}
|
||||
|
||||
// Get the most reliable keysym value we can get from a key event
|
||||
export function getKeysym(evt){
|
||||
export function getKeysym(evt) {
|
||||
const key = getKey(evt);
|
||||
|
||||
if (key === 'Unidentified') {
|
||||
|
|
|
@ -115,8 +115,8 @@ describe('WebUtil', function() {
|
|||
window.chrome = {
|
||||
storage: {
|
||||
sync: {
|
||||
get(cb){ cb(settings); },
|
||||
set(){},
|
||||
get(cb) { cb(settings); },
|
||||
set() {},
|
||||
remove() {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ const codepoints = {};
|
|||
|
||||
for (let i = 0; i < arr.length; ++i) {
|
||||
const result = re.exec(arr[i]);
|
||||
if (result){
|
||||
if (result) {
|
||||
const keyname = result[1];
|
||||
const keysym = parseInt(result[2], 16);
|
||||
const remainder = result[3];
|
||||
|
@ -59,7 +59,7 @@ for (let i = 0; i < arr.length; ++i) {
|
|||
if (unicodeRes) {
|
||||
const unicode = parseInt(unicodeRes[1], 16);
|
||||
// The first entry is the preferred one
|
||||
if (!codepoints[unicode]){
|
||||
if (!codepoints[unicode]) {
|
||||
codepoints[unicode] = { keysym: keysym, name: keyname };
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue