0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-05-07 16:38:38 +00:00
This commit is contained in:
Víctor Losada Hernández
2026-04-13 01:30:17 +02:00
parent 9dba69e8da
commit 2e990238d3
+4 -5
View File
@@ -18,12 +18,11 @@ import darkbrewery from '@themes/codeMirror/darkbrewery.js';
const themes = { default: defaultCM5Theme, darkbrewery, ...themesImport };
const EditorThemes = Object.entries(themes)
.filter(([name, value]) =>
Array.isArray(value) &&
.filter(([name, value])=>Array.isArray(value) &&
!name.endsWith('Init') &&
!name.endsWith('Style')
)
.map(([name]) => name);
.map(([name])=>name);
const PAGEBREAK_REGEX_V3 = /^(?=\\page(?:break)?(?: *{[^\n{}]*})?$)/m;
@@ -91,7 +90,7 @@ const Editor = createReactClass({
document.addEventListener('keydown', this.handleControlKeys);
const editorTheme = window.localStorage.getItem(EDITOR_THEME_KEY);
if (editorTheme && EditorThemes.includes(editorTheme)) {
if(editorTheme && EditorThemes.includes(editorTheme)) {
this.setState({ editorTheme });
} else {
this.setState({ editorTheme: 'default' });
@@ -319,7 +318,7 @@ const Editor = createReactClass({
return this.codeEditor.current?.undo();
},
foldCode: function() {
foldCode : function() {
return this.codeEditor.current?.foldAll();
},