From aac384390b74428e1b9f0ebf81ad7fe30baa1cd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Sun, 10 May 2026 19:41:11 +0200 Subject: [PATCH] lint --- client/components/codeEditor/codeEditor.jsx | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/client/components/codeEditor/codeEditor.jsx b/client/components/codeEditor/codeEditor.jsx index c70e1109b..ae91361cb 100644 --- a/client/components/codeEditor/codeEditor.jsx +++ b/client/components/codeEditor/codeEditor.jsx @@ -123,13 +123,11 @@ const createHighlightPlugin = (renderer, tab)=>{ tokens.forEach((tok)=>{ const line = view.state.doc.line(tok.line + 1); - // INLINE TOKENS (marks) if(tok.from != null && tok.to != null && tok.from < tok.to) { const from = line.from + tok.from; const to = line.from + tok.to; const attrs = {}; - // attach URL only for links if(tok.type === 'Image' && tok.url) { attrs['data-url'] = tok.url; @@ -143,10 +141,7 @@ const createHighlightPlugin = (renderer, tab)=>{ : {}) }).range(from, to) ); - } - - // LINE TOKENS - else { + } else { decos.push( Decoration.line({ class : `cm-${tok.type}` @@ -168,9 +163,7 @@ const createHighlightPlugin = (renderer, tab)=>{ return Decoration.set(decos); } }, - { - decorations : (v)=>v.decorations - } + { decorations: (v)=>v.decorations } ); };