In markdown mode, some syntax cannot be highlighted

Hello, I use markdown mode and use markdown syntax to highlight. But I found that only some of the syntax can be highlighted, and some codes can not be highlighted. For example, code, blockqute, list, is that I have no configuration, right? Here is my code and console DOM structure

import { EditorView, keymap } from '@codemirror/view';
import { EditorState } from '@codemirror/state';
import { bracketMatching } from '@codemirror/matchbrackets';
import { closeBrackets, closeBracketsKeymap } from '@codemirror/closebrackets';
import { defaultKeymap, defaultTabBinding } from '@codemirror/commands';
import { history, historyKeymap } from '@codemirror/history';
import { classHighlightStyle } from '@codemirror/highlight';
import { markdown, markdownLanguage } from '@codemirror/lang-markdown';

new EditorView({
	state: EditorState.create({
		doc: $('#text').val(),
		extensions: [
			history(),
			classHighlightStyle,
			bracketMatching(),
			closeBrackets(),
			markdown({
				base: markdownLanguage
			}),
			keymap.of([defaultTabBinding, ...closeBracketsKeymap, ...defaultKeymap, ...historyKeymap])
		]
	})
});

Lists and blockquotes do have a highlighting tag associated with them, but classHighlightStyle doesn’t style those. You could add your own additional styling (by defining an extra HighlightStyle) to add classes for those. Code blocks by default don’t get a style in the Markdown language mode, but I guess they should. This patch adds the monospace tag to those.

1 Like

Well, thank you very much