mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-05-07 18:48:39 +00:00
lint pass
This commit is contained in:
@@ -49,9 +49,9 @@ const emojiCompletionList = (context)=>{
|
|||||||
//Info is the tooltip
|
//Info is the tooltip
|
||||||
|
|
||||||
return {
|
return {
|
||||||
from : word.from + 1,
|
from : word.from + 1,
|
||||||
options,
|
options,
|
||||||
filter: false,
|
filter : false,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ const programmaticCursorLineField = StateField.define({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const CodeEditor = forwardRef(
|
const CodeEditor = forwardRef(
|
||||||
(
|
(
|
||||||
{
|
{
|
||||||
language = '',
|
language = '',
|
||||||
tab = 'brewText',
|
tab = 'brewText',
|
||||||
@@ -364,7 +364,7 @@ const CodeEditor = forwardRef(
|
|||||||
|
|
||||||
view.dispatch({
|
view.dispatch({
|
||||||
selection : { anchor: pos },
|
selection : { anchor: pos },
|
||||||
effects : [setProgrammaticCursorLine.of(pos), EditorView.scrollIntoView(pos, { y: 'start' })],
|
effects : [setProgrammaticCursorLine.of(pos), EditorView.scrollIntoView(pos, { y: 'start' })],
|
||||||
});
|
});
|
||||||
|
|
||||||
view.focus();
|
view.focus();
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ export function tokenizeCustomMarkdown(text) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- multiline def list ---
|
// --- multiline def list ---
|
||||||
if(!/^::/.test(lines[lineNumber]) && lineNumber + 1 < lines.length && /^::/.test(lines[lineNumber + 1])) {
|
if(!/^::/.test(lines[lineNumber]) && lineNumber + 1 < lines.length && /^::/.test(lines[lineNumber + 1])) {
|
||||||
const startLine = lineNumber;
|
const startLine = lineNumber;
|
||||||
const defs = [];
|
const defs = [];
|
||||||
|
|||||||
@@ -87,9 +87,9 @@ const Editor = createReactClass({
|
|||||||
componentDidMount : function() {
|
componentDidMount : function() {
|
||||||
|
|
||||||
const brewRenderer = document.getElementById('BrewRenderer');
|
const brewRenderer = document.getElementById('BrewRenderer');
|
||||||
brewRenderer.onload = () => brewRenderer.contentDocument?.addEventListener('keydown', this.handleControlKeys);
|
brewRenderer.onload = ()=>brewRenderer.contentDocument?.addEventListener('keydown', this.handleControlKeys);
|
||||||
document.addEventListener('keydown', this.handleControlKeys);
|
document.addEventListener('keydown', this.handleControlKeys);
|
||||||
|
|
||||||
const editorTheme = window.localStorage.getItem(EDITOR_THEME_KEY);
|
const editorTheme = window.localStorage.getItem(EDITOR_THEME_KEY);
|
||||||
if(editorTheme && EditorThemes.includes(editorTheme)) {
|
if(editorTheme && EditorThemes.includes(editorTheme)) {
|
||||||
this.setState({ editorTheme });
|
this.setState({ editorTheme });
|
||||||
|
|||||||
Reference in New Issue
Block a user