fix: 修复缺失语法高亮的问题
Release / release (push) Successful in 37s

This commit is contained in:
chuan
2026-05-21 23:35:28 +08:00
Unverified
parent 5f4b9bc82f
commit 8dd9e1a71a
6 changed files with 97 additions and 4 deletions
+2 -1
View File
@@ -1 +1,2 @@
- 和 playwright-mcp 相关操作的临时文件放在文件夹u `.playwright-mcp` 下面
- 和 playwright-mcp 相关操作的临时文件放在文件夹u `.playwright-mcp` 下面
- `.gitea` 是 gitea 这个项目的官方源代码
+5 -1
View File
@@ -16,6 +16,8 @@ const requiredSnippets = [
'--theme-version: "1.26.1',
"--color-primary: #0969da",
"--github-bgColor-accent-emphasis: #0969da",
"--color-syntax-keyword: #cf222e",
"--color-syntax-string: #0a3069",
".ui.primary.button",
".repository.file.list #repo-files-table",
".page-content.user.signin",
@@ -29,6 +31,8 @@ const requiredDarkSnippets = [
"--color-body: #0d1117",
"--color-text: #e6edf3",
"--github-bgColor-accent-emphasis: #1f6feb",
"--color-syntax-keyword: #ff7b72",
"--color-syntax-string: #a5d6ff",
".ui.primary.button",
];
@@ -70,7 +74,7 @@ for (const file of [
}
}
for (const file of ["theme-meta.ts", "core.ts", "github-colors.ts", "target-colors.ts", "index.ts"]) {
for (const file of ["theme-meta.ts", "core.ts", "github-colors.ts", "syntax-colors.ts", "target-colors.ts", "index.ts"]) {
if (!darkThemeFiles.includes(file)) {
throw new Error(`themes/github-dark is missing theme source file: ${file}`);
}
+5
View File
@@ -8,6 +8,11 @@ const requiredRootTokens = [
"--color-light-border",
"--border-radius",
"--github-bgColor-accent-emphasis",
"--color-syntax-keyword",
"--color-syntax-string",
"--color-syntax-comment",
"--color-syntax-number",
"--color-syntax-invalid",
"--color-nav-hoverBg",
"--color-label-hoverBg",
"--color-reaction-hoverBg",
+1 -1
View File
@@ -2,10 +2,10 @@ import { ansiColorTokens } from "../github-light/ansi-colors";
import { diffColorTokens } from "../github-light/diff-colors";
import { namedColorTokens } from "../github-light/named-colors";
import { semanticColorTokens } from "../github-light/semantic-colors";
import { syntaxColorTokens } from "../github-light/syntax-colors";
import { consoleTokens } from "./console";
import { coreTokens } from "./core";
import { githubColorTokens } from "./github-colors";
import { syntaxColorTokens } from "./syntax-colors";
import { targetColorTokens } from "./target-colors";
import { themeMeta } from "./theme-meta";
+43
View File
@@ -0,0 +1,43 @@
export const syntaxColorTokens = `
--color-syntax-keyword: #ff7b72;
--color-syntax-bool: #79c0ff;
--color-syntax-control: #ff7b72;
--color-syntax-name: #d2a8ff;
--color-syntax-type: #ffa657;
--color-syntax-number: #79c0ff;
--color-syntax-operator: #79c0ff;
--color-syntax-regexp: #7ee787;
--color-syntax-string: #a5d6ff;
--color-syntax-comment: #8b949e;
--color-syntax-invalid: #f85149;
--color-syntax-link: var(--color-primary);
--color-syntax-tag: #7ee787;
--color-syntax-attribute: #79c0ff;
--color-syntax-property: #79c0ff;
--color-syntax-variable: #ffa657;
--color-syntax-string-special: #a5d6ff;
--color-syntax-escape: #a5d6ff;
--color-syntax-entity: #ffa657;
--color-syntax-preproc: #79c0ff;
--color-syntax-preproc-file: #79c0ff;
--color-syntax-decorator: #d2a8ff;
--color-syntax-namespace: #c9d1d9;
--color-syntax-name-pseudo: #c9d1d9;
--color-syntax-comment-special: #8b949e;
--color-syntax-text: var(--color-text);
--color-syntax-text-alt: var(--color-text);
--color-syntax-punctuation: var(--color-text);
--color-syntax-whitespace: #f85149;
--color-syntax-diff-fg: var(--color-text);
--color-syntax-deleted-bg: #67060c;
--color-syntax-inserted-bg: #033a16;
--color-syntax-emph: var(--color-text);
--color-syntax-strong: var(--color-text);
--color-syntax-heading: #1f6feb;
--color-syntax-subheading: #1f6feb;
--color-syntax-output: var(--color-text);
--color-syntax-prompt: var(--color-text);
--color-syntax-traceback: #f85149;
--color-syntax-matching-bracket-bg: #2f81f766;
--color-syntax-nonmatching-bracket-bg: #f8514933;
`.trim();
+41 -1
View File
@@ -1,3 +1,43 @@
export const syntaxColorTokens = `
--color-syntax-keyword: #cf222e;
--color-syntax-bool: #0550ae;
--color-syntax-control: #cf222e;
--color-syntax-name: #6639ba;
--color-syntax-type: #953800;
--color-syntax-number: #0550ae;
--color-syntax-operator: #0550ae;
--color-syntax-regexp: #116329;
--color-syntax-string: #0a3069;
--color-syntax-comment: #59636e;
--color-syntax-invalid: #82071e;
--color-syntax-link: var(--color-primary);
--color-syntax-tag: #116329;
--color-syntax-attribute: #0550ae;
--color-syntax-property: #0550ae;
--color-syntax-variable: #953800;
--color-syntax-string-special: #0a3069;
--color-syntax-escape: #0a3069;
--color-syntax-entity: #953800;
--color-syntax-preproc: #0550ae;
--color-syntax-preproc-file: #0550ae;
--color-syntax-decorator: #6639ba;
--color-syntax-namespace: #1f2328;
--color-syntax-name-pseudo: #1f2328;
--color-syntax-comment-special: #59636e;
--color-syntax-text: var(--color-text);
--color-syntax-text-alt: var(--color-text);
--color-syntax-punctuation: var(--color-text);
--color-syntax-whitespace: #82071e;
--color-syntax-diff-fg: var(--color-text);
--color-syntax-deleted-bg: var(--color-diff-removed-row-bg);
--color-syntax-inserted-bg: var(--color-diff-added-row-bg);
--color-syntax-emph: var(--color-text);
--color-syntax-strong: var(--color-text);
--color-syntax-heading: #0550ae;
--color-syntax-subheading: #0550ae;
--color-syntax-output: var(--color-text);
--color-syntax-prompt: var(--color-text);
--color-syntax-traceback: #82071e;
--color-syntax-matching-bracket-bg: #0969da33;
--color-syntax-nonmatching-bracket-bg: #cf222e33;
`.trim();