further lint (i'm crazy ok?)

This commit is contained in:
Víctor Losada Hernández
2026-09-27 23:55:19 +02:00
parent 15ebd6913a
commit 0eee4e04ff
@@ -35,11 +35,9 @@ export async function formatCSS(view) {
); );
if(formatted === code) return true; if(formatted === code) return true;
const dom = view.dom; view.dom.classList.add('cm-flash');
dom.classList.add('cm-flash');
setTimeout(()=>{ setTimeout(()=>{
dom.classList.remove('cm-flash'); view.dom.classList.remove('cm-flash');
view.dispatch({ view.dispatch({
changes : { changes : {
@@ -67,17 +65,15 @@ const insertTab = (view)=>{
const shouldIndent = view.state.selection.ranges.some((range)=>view.state.doc.lineAt(range.from).number !== const shouldIndent = view.state.selection.ranges.some((range)=>view.state.doc.lineAt(range.from).number !==
view.state.doc.lineAt(range.to).number view.state.doc.lineAt(range.to).number
); );
if(shouldIndent) return indentMore(view); if(shouldIndent) return indentMore(view);
return forEachSelection(view, (state, range)=>{ return forEachSelection(view, (state, range)=>{
const { from, to } = range; const { from, to } = range;
return { return {
changes : { from, to, insert: ' ' }, changes : { from, to, insert: ' ' }, // Insert two spaces, not a tab char!
range : EditorSelection.cursor(from + 2) range : EditorSelection.cursor(from + 2)
}; };
}); });
// Insert two spaces, not a tab char!
}; };
const wrapSelection = (prefix, suffix)=>(view)=>forEachSelection(view, (state, range)=>{ const wrapSelection = (prefix, suffix)=>(view)=>forEachSelection(view, (state, range)=>{