Closed jinghaihan closed 1 year ago
Can you post an example?
As in your image, that is how CodeMirror processes them.
I meant, keywords in the config e.g.
const editor = CodeMirror(document.body, {
lineNumbers: true,
mode: "javascript",
keyword: {
"word1": "style1",
"word2": "style1",
"word3": "style1",
"example\.com": "style2",
"abc\\d+": "style2"
}
});
That might be the case in CodeMirror. You can ask codemirror5.
When the keyword appears in single quotation marks, it is normally added with "cm string", but when it appears in double quotation marks, its class name is "cm keyword"
Is there any good solution?