Файли
openidea/e2e/vueHighlight.fixture.ts
T
l0ng-ai edd2e90b9b feat(editor): colour Vue component tags apart from HTML elements (#7059)
Component tags in Vue templates (<Icon>, <el-input>) had the same colour as HTML elements. PascalCase or hyphenated tag names now use a new --syn-custom-tag token, the Custom tag name colour: #2fbaa3 in Islands Dark and #b21dbf in Islands Light, with values for high contrast, the palette themes and Harbor Night; other themes fall back to the tag colour.

Fixes #6894
2026-11-30 21:59:52 +08:00

13 рядки
588 B
TypeScript

import "../src/styles/tokens.css";
import { EditorView } from "@codemirror/view";
import { syntaxHighlighting } from "@codemirror/language";
import { openideaHighlightStyle } from "../src/editor/core/cm/highlight";
import { vueLanguage } from "../src/editor/core/cm/vue";
document.documentElement.dataset.theme = new URLSearchParams(location.search).get("theme") ?? "dark";
new EditorView({
parent: document.body,
doc: '<template>\n <div><Icon /><el-input v-model="x"></el-input></div>\n</template>\n',
extensions: [vueLanguage(), syntaxHighlighting(openideaHighlightStyle)],
});