Skip to content

Commit

Permalink
chore: change the color of brackets of [xxx](xxx) in markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
hui890514 committed Aug 30, 2024
1 parent e4ff67d commit 5512f53
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,13 @@ const YAML: TokenObject = {
'entity.name.tag.yaml': tokenColor.default,
}

const markdown: TokenObject = {
'meta.link.inline.markdown': tokenColor.keyword,
}

export function getTokenColors(index: Index) {
const tokenColors: { [index: string]: string[] } = {}
const rules = { ...basic, ...JSON, ...YAML }
const rules = { ...basic, ...JSON, ...YAML, ...markdown }
for (const rule of Object.keys(rules))
(tokenColors[rules[rule][index]] ??= []).push(rule)
return Object.keys(tokenColors).map(key => ({
Expand Down
3 changes: 2 additions & 1 deletion themes/e-ink-color-dark.json
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,8 @@
"support.constant",
"support.variable",
"support.other",
"variable.language"
"variable.language",
"meta.link.inline.markdown"
],
"settings": {
"foreground": "#FF79C6",
Expand Down
3 changes: 2 additions & 1 deletion themes/e-ink-color-light.json
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,8 @@
"support.constant",
"support.variable",
"support.other",
"variable.language"
"variable.language",
"meta.link.inline.markdown"
],
"settings": {
"foreground": "#3F51B5",
Expand Down
3 changes: 2 additions & 1 deletion themes/e-ink.json
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,8 @@
"support.constant",
"support.variable",
"support.other",
"variable.language"
"variable.language",
"meta.link.inline.markdown"
],
"settings": {
"foreground": "#000000",
Expand Down

0 comments on commit 5512f53

Please sign in to comment.