mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-24 09:56:58 +00:00
lint
This commit is contained in:
1 parent
102d1f4186
commit
6e39a70706
1 file changed
+5
-5
@@ -181,9 +181,9 @@ const CodeEditor = forwardRef(
|
||||
return page;
|
||||
};
|
||||
|
||||
const getFoldRanges = (state) => {
|
||||
const getFoldRanges = (state)=>{
|
||||
const folds = [];
|
||||
state.field(foldState, false)?.between(0, state.doc.length, (from, to) => {
|
||||
state.field(foldState, false)?.between(0, state.doc.length, (from, to)=>{
|
||||
folds.push({ from, to });
|
||||
});
|
||||
return folds;
|
||||
@@ -293,11 +293,11 @@ const CodeEditor = forwardRef(
|
||||
};
|
||||
}, []);
|
||||
|
||||
const restoreFolds = (view, folds) => {
|
||||
if (!folds?.length) return;
|
||||
const restoreFolds = (view, folds)=>{
|
||||
if(!folds?.length) return;
|
||||
|
||||
view.dispatch({
|
||||
effects: folds.map(f => foldEffect.of(f))
|
||||
effects : folds.map((f)=>foldEffect.of(f))
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user