0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-07 03:22:38 +00:00

Fix linting issues

#629
This commit is contained in:
Charlie Humphreys
2021-11-08 17:24:33 -06:00
parent f3d0d3e2c9
commit b06dedfa4a
2 changed files with 12 additions and 13 deletions

View File

@@ -82,20 +82,20 @@ const CodeEditor = createClass({
tabSize : 2, tabSize : 2,
historyEventDelay : 250, historyEventDelay : 250,
extraKeys : { extraKeys : {
'Ctrl-B' : this.makeBold, 'Ctrl-B' : this.makeBold,
'Cmd-B' : this.makeBold, 'Cmd-B' : this.makeBold,
'Ctrl-I' : this.makeItalic, 'Ctrl-I' : this.makeItalic,
'Cmd-I' : this.makeItalic, 'Cmd-I' : this.makeItalic,
'Ctrl-M' : this.makeSpan, 'Ctrl-M' : this.makeSpan,
'Cmd-M' : this.makeSpan, 'Cmd-M' : this.makeSpan,
'Ctrl-/' : this.makeComment, 'Ctrl-/' : this.makeComment,
'Cmd-/' : this.makeComment, 'Cmd-/' : this.makeComment,
'Ctrl-\\' : this.toggleCodeFolded, 'Ctrl-\\' : this.toggleCodeFolded,
'Cmd-\\' : this.toggleCodeFolded, 'Cmd-\\' : this.toggleCodeFolded,
'Ctrl-[' : this.foldAllCode, 'Ctrl-[' : this.foldAllCode,
'Cmd-[' : this.foldAllCode, 'Cmd-[' : this.foldAllCode,
'Ctrl-]' : this.unfoldAllCode, 'Ctrl-]' : this.unfoldAllCode,
'Cmd-]' : this.unfoldAllCode 'Cmd-]' : this.unfoldAllCode
}, },
foldGutter : true, foldGutter : true,
foldOptions : { foldOptions : {

View File

@@ -2,7 +2,6 @@ module.exports = {
registerHomebreweryHelper : function(CodeMirror) { registerHomebreweryHelper : function(CodeMirror) {
CodeMirror.registerHelper('fold', 'homebrewery', function(cm, start) { CodeMirror.registerHelper('fold', 'homebrewery', function(cm, start) {
const matcher = /^\\page.*/; const matcher = /^\\page.*/;
const firstLine = cm.getLine(start.line);
const prevLine = cm.getLine(start.line - 1); const prevLine = cm.getLine(start.line - 1);
if(start.line === cm.firstLine() || prevLine.match(matcher)) { if(start.line === cm.firstLine() || prevLine.match(matcher)) {