Skip to content

Commit 40421f0

Browse files
authored
feat: render code blocks in markdown (#164)
1 parent 2ca1f20 commit 40421f0

File tree

11 files changed

+1038
-56
lines changed

11 files changed

+1038
-56
lines changed

.github/workflows/publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
- uses: actions/setup-node@v3
2020
with:
21-
node-version: '14'
21+
node-version: latest
2222

2323
- run: yarn install --frozen-lockfile
2424

media/chat.css

+11
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,17 @@
9191
color: var(--vscode-sideBar-foreground);
9292
}
9393

94+
.sidebar__chat-assistant--chat-bubble-text code {
95+
font-family: var(--vscode-editor-font-family);
96+
font-size: var(--vscode-sidebar-font-size);
97+
}
98+
99+
.sidebar__chat-assistant--chat-bubble-text pre {
100+
background-color: var(--vscode-editor-background);
101+
margin: 0;
102+
border-radius: var(--spacing-xs);
103+
}
104+
94105
.sidebar__chat-assistant--code-block {
95106
margin: 0;
96107
font-family: var(--vscode-editor-font-family);

media/github-dark.min.css

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
pre code.hljs {
2+
display: block;
3+
overflow-x: auto;
4+
padding: 1em;
5+
}
6+
code.hljs {
7+
padding: 3px 5px;
8+
} /*!
9+
Theme: GitHub Dark
10+
Description: Dark theme as seen on github.com
11+
Author: github.com
12+
Maintainer: @Hirse
13+
Updated: 2021-05-15
14+
15+
Outdated base version: https://github.com/primer/github-syntax-dark
16+
Current colors taken from GitHub's CSS
17+
*/
18+
.hljs {
19+
color: #c9d1d9;
20+
background: #0d1117;
21+
}
22+
.hljs-doctag,
23+
.hljs-keyword,
24+
.hljs-meta .hljs-keyword,
25+
.hljs-template-tag,
26+
.hljs-template-variable,
27+
.hljs-type,
28+
.hljs-variable.language_ {
29+
color: #ff7b72;
30+
}
31+
.hljs-title,
32+
.hljs-title.class_,
33+
.hljs-title.class_.inherited__,
34+
.hljs-title.function_ {
35+
color: #d2a8ff;
36+
}
37+
.hljs-attr,
38+
.hljs-attribute,
39+
.hljs-literal,
40+
.hljs-meta,
41+
.hljs-number,
42+
.hljs-operator,
43+
.hljs-selector-attr,
44+
.hljs-selector-class,
45+
.hljs-selector-id,
46+
.hljs-variable {
47+
color: #79c0ff;
48+
}
49+
.hljs-meta .hljs-string,
50+
.hljs-regexp,
51+
.hljs-string {
52+
color: #a5d6ff;
53+
}
54+
.hljs-built_in,
55+
.hljs-symbol {
56+
color: #ffa657;
57+
}
58+
.hljs-code,
59+
.hljs-comment,
60+
.hljs-formula {
61+
color: #8b949e;
62+
}
63+
.hljs-name,
64+
.hljs-quote,
65+
.hljs-selector-pseudo,
66+
.hljs-selector-tag {
67+
color: #7ee787;
68+
}
69+
.hljs-subst {
70+
color: #c9d1d9;
71+
}
72+
.hljs-section {
73+
color: #1f6feb;
74+
font-weight: 700;
75+
}
76+
.hljs-bullet {
77+
color: #f2cc60;
78+
}
79+
.hljs-emphasis {
80+
color: #c9d1d9;
81+
font-style: italic;
82+
}
83+
.hljs-strong {
84+
color: #c9d1d9;
85+
font-weight: 700;
86+
}
87+
.hljs-addition {
88+
color: #aff5b4;
89+
background-color: #033a16;
90+
}
91+
.hljs-deletion {
92+
color: #ffdcd7;
93+
background-color: #67060c;
94+
}

media/github.min.css

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
pre code.hljs {
2+
display: block;
3+
overflow-x: auto;
4+
padding: 1em;
5+
}
6+
code.hljs {
7+
padding: 3px 5px;
8+
} /*!
9+
Theme: GitHub
10+
Description: Light theme as seen on github.com
11+
Author: github.com
12+
Maintainer: @Hirse
13+
Updated: 2021-05-15
14+
15+
Outdated base version: https://github.com/primer/github-syntax-light
16+
Current colors taken from GitHub's CSS
17+
*/
18+
.hljs {
19+
color: #24292e;
20+
background: #fff;
21+
}
22+
.hljs-doctag,
23+
.hljs-keyword,
24+
.hljs-meta .hljs-keyword,
25+
.hljs-template-tag,
26+
.hljs-template-variable,
27+
.hljs-type,
28+
.hljs-variable.language_ {
29+
color: #d73a49;
30+
}
31+
.hljs-title,
32+
.hljs-title.class_,
33+
.hljs-title.class_.inherited__,
34+
.hljs-title.function_ {
35+
color: #6f42c1;
36+
}
37+
.hljs-attr,
38+
.hljs-attribute,
39+
.hljs-literal,
40+
.hljs-meta,
41+
.hljs-number,
42+
.hljs-operator,
43+
.hljs-selector-attr,
44+
.hljs-selector-class,
45+
.hljs-selector-id,
46+
.hljs-variable {
47+
color: #005cc5;
48+
}
49+
.hljs-meta .hljs-string,
50+
.hljs-regexp,
51+
.hljs-string {
52+
color: #032f62;
53+
}
54+
.hljs-built_in,
55+
.hljs-symbol {
56+
color: #e36209;
57+
}
58+
.hljs-code,
59+
.hljs-comment,
60+
.hljs-formula {
61+
color: #6a737d;
62+
}
63+
.hljs-name,
64+
.hljs-quote,
65+
.hljs-selector-pseudo,
66+
.hljs-selector-tag {
67+
color: #22863a;
68+
}
69+
.hljs-subst {
70+
color: #24292e;
71+
}
72+
.hljs-section {
73+
color: #005cc5;
74+
font-weight: 700;
75+
}
76+
.hljs-bullet {
77+
color: #735c0f;
78+
}
79+
.hljs-emphasis {
80+
color: #24292e;
81+
font-style: italic;
82+
}
83+
.hljs-strong {
84+
color: #24292e;
85+
font-weight: 700;
86+
}
87+
.hljs-addition {
88+
color: #22863a;
89+
background-color: #f0fff4;
90+
}
91+
.hljs-deletion {
92+
color: #b31d28;
93+
background-color: #ffeef0;
94+
}

0 commit comments

Comments
 (0)