1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Ran eslint fix on existing codebase

Had to do some manual fixing of the app.js file due to misplaced
comments
This commit is contained in:
Dan Brown
2023-04-18 22:20:02 +01:00
parent 752ee664c2
commit e711290d8b
106 changed files with 905 additions and 869 deletions

View File

@ -34,8 +34,8 @@ function provide(editor) {
shortcuts['Mod-8'] = cm => editor.actions.wrapSelection('`', '`');
shortcuts['Shift-Mod-e'] = cm => editor.actions.wrapSelection('`', '`');
shortcuts['Mod-9'] = cm => editor.actions.cycleCalloutTypeAtSelection();
shortcuts['Mod-p'] = cm => editor.actions.replaceLineStart('-')
shortcuts['Mod-o'] = cm => editor.actions.replaceLineStartForOrderedList()
shortcuts['Mod-p'] = cm => editor.actions.replaceLineStart('-');
shortcuts['Mod-o'] = cm => editor.actions.replaceLineStartForOrderedList();
return shortcuts;
}
@ -46,14 +46,12 @@ function provide(editor) {
* @return {{key: String, run: function, preventDefault: boolean}[]}
*/
export function provideKeyBindings(editor) {
const shortcuts= provide(editor);
const shortcuts = provide(editor);
const keyBindings = [];
const wrapAction = (action) => {
return () => {
action();
return true;
};
const wrapAction = action => () => {
action();
return true;
};
for (const [shortcut, action] of Object.entries(shortcuts)) {
@ -61,4 +59,4 @@ export function provideKeyBindings(editor) {
}
return keyBindings;
}
}