0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-03-29 07:48:11 +00:00

small fixes

This commit is contained in:
Víctor Losada Hernández
2026-03-26 14:42:56 +01:00
parent b0ebeaffb9
commit 3b9eae2e4f
3 changed files with 17 additions and 23 deletions

View File

@@ -28,7 +28,6 @@ import { customHighlightStyle, tokenizeCustomMarkdown } from './customHighlight.
import { legacyCustomHighlightStyle, legacyTokenizeCustomMarkdown } from './legacyCustomHighlight.js'; //only makes highlight for
const createHighlightPlugin = (renderer)=>{
console.log(renderer);
const tokenize = renderer === 'V3' ? tokenizeCustomMarkdown : legacyTokenizeCustomMarkdown;
return ViewPlugin.fromClass(
@@ -164,7 +163,6 @@ const CodeEditor = forwardRef(
highlightActiveLine(),
highlightActiveLineGutter(),
customHighlightPlugin,
highlightCompartment.of(combinedHighlight),
];
};
@@ -237,10 +235,9 @@ const CodeEditor = forwardRef(
const view = viewRef.current;
if(!view) return;
const highlightExtension =
renderer === 'V3'
? syntaxHighlighting(customHighlightStyle)
: syntaxHighlighting(legacyCustomHighlightStyle);
const highlightExtension =renderer === 'V3'
? syntaxHighlighting(customHighlightStyle)
: syntaxHighlighting(legacyCustomHighlightStyle);
const customHighlightPlugin = createHighlightPlugin(renderer);
@@ -294,7 +291,7 @@ const CodeEditor = forwardRef(
focus : ()=>viewRef.current.focus(),
}));
return <div className='codeEditor' ref={editorRef} style={style} />;
return <div className={`codeEditor ${tab}`} ref={editorRef} style={style} />;
},
);